| Summary: | [compiler] not-optimal message on base-call w/o parens | ||
|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> |
| Component: | OTJ | Assignee: | Stephan Herrmann <stephan.herrmann> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 0.7 | ||
| Target Milestone: | 0.7.1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
The proposed fixed cannot easily be applied, because the additional rule renders the grammar invalid. I could not find a legal grammar extension for this particular case (LALR(1) constraints). Closing as WONTFIX given that current reporting still somehow points to the actual cause/syntax error. . |
Consider the following snippet within a role class of MyTeam: callin void m() { within (MyTeam.this) base.m; // missing "()" } This gives two errors which are not very helpful: within (MyTeam.this) ^ Syntax error on tokens, delete these tokens base.m; ^ Syntax error, insert ") Statement" to complete plus a warning: Unnecessary semicolon By comparison a "super.m" is interpreted as an (unresolvable) field access with no secondary errors. This lets me think that with this rule FieldAccess ::= 'base' '.' 'Identifier' /.$putCase consumeInvalidBaseAccess(true); $break ./ we could give a much more precise error message.