Added a collect overload for constructor assignables. - #2886
rodinaarssen wants to merge 1 commit into
Conversation
Even though the compiler does not support this feature, users can still write it down. An error is generated elsewhere
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2886 +/- ##
=======================================
- Coverage 45% 45% -1%
+ Complexity 6786 6776 -10
=======================================
Files 843 843
Lines 68798 68798
Branches 10029 10029
=======================================
- Hits 31345 31318 -27
- Misses 35064 35091 +27
Partials 2389 2389 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| private void checkAssignment(Statement current, constructor: (Assignable) `<Name name> ( <{Assignable ","}+ arguments> )` , str operator, Statement rhs, Collector c){ | ||
| c.report(error(current, "Constructor assignable is not supported by the compiler")); | ||
| collect(name, arguments, c); |
There was a problem hiding this comment.
why is this removed? we might still want to typecheck the expressions in there?
There was a problem hiding this comment.
This was moved to the newly added collect overload
There was a problem hiding this comment.
but someone should still go into that part right? like name etc? or is this function never called?
There was a problem hiding this comment.
https://github.com/usethesource/rascal/pull/2886/changes/BASE..6764ad27c85e319e6287c726dcecd63cb91919b9#diff-9060466303f8f0b8929cbe79c70ea73debbffd71f9bf892ba887946800a1cc30R624 dispatches both into the new collect and to this checkAssignment overload
There was a problem hiding this comment.
yes, it's just that the other checkAssignments seem to collect (but not all of them). So I'm trying to pattern match.
But I guess it's wiser to let @PaulKlint review this PR.



Even though the compiler does not support this feature, users can still write it down. An error is generated elsewhere.
Fixes #2510