Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,9 @@ void collect(current:(Assignable) `<Assignable receiver> ? <Expression defaultEx
collect(receiver, defaultExpression, c);
}

// | constructor : Name name "(" {Assignable ","}+ arguments ")"
void collect(current:(Assignable) `<Name name> ( <{Assignable ","}+ arguments> )`, Collector c) {
collect(name, arguments, c);
}

void collect(current:(Assignable) `\< <{Assignable ","}+ elements> \>`, Collector c){
collect(elements, c);
Expand Down Expand Up @@ -1054,7 +1056,6 @@ set[str] getNames(Statement s) = {prettyPrintName(nm) | /QualifiedName nm := s};

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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this removed? we might still want to typecheck the expressions in there?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved to the newly added collect overload

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but someone should still go into that part right? like name etc? or is this function never called?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

}

private void checkAssignment(Statement current, receiver: (Assignable) `\< <{Assignable ","}+ elements> \>`, str operator, Statement rhs, Collector c){
Expand Down
Loading