Index: pkg/compiler/lib/src/resolution/members.dart |
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart |
index 837fb401e856eac7faa3df939601f43bd8be2c8a..f649d3257425167db5f806039e91540aa25951d4 100644 |
--- a/pkg/compiler/lib/src/resolution/members.dart |
+++ b/pkg/compiler/lib/src/resolution/members.dart |
@@ -3012,27 +3012,29 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
MessageKind.ASSIGNING_TYPE, const {}); |
registry.registerThrowNoSuchMethod(); |
} else if (target.isFinal || target.isConst) { |
- if (Elements.isStaticOrTopLevelField(target) || target.isLocal) { |
+ if (Elements.isStaticOrTopLevelField(target) || target.isLocal || |
+ node.isSuperCall || node.isThisCall) { |
Johnni Winther
2015/04/17 12:17:37
Remove `node.isThisCall`. It is not a statically k
Siggi Cherem (dart-lang)
2015/04/17 16:38:24
Good call. Done.
|
setter = reportAndCreateErroneousElement( |
node.selector, target.name, MessageKind.CANNOT_RESOLVE_SETTER, |
const {}); |
} else { |
- // For instance fields we don't report a warning here because the type |
- // checker will detect this as well and report a better error message |
- // with the context of the containing class. |
+ // For implicit instance fields we don't report a warning here because |
+ // the type checker will detect this as well and report a better error |
+ // message with the context of the containing class. |
} |
registry.registerThrowNoSuchMethod(); |
if (node.isSuperCall) registry.registerSuperNoSuchMethod(); |
Johnni Winther
2015/04/17 12:17:37
I would special case super calls here, creating an
Siggi Cherem (dart-lang)
2015/04/17 16:38:24
Not sure I completely followed - when you say a sp
Johnni Winther
2015/04/17 17:56:09
'method' -> 'message' !
|
} else if (target.isFunction && target.name != '[]=') { |
assert(!target.isSetter); |
- if (Elements.isStaticOrTopLevelFunction(target) || target.isLocal) { |
+ if (Elements.isStaticOrTopLevelFunction(target) || target.isLocal || |
+ node.isSuperCall || node.isThisCall) { |
Johnni Winther
2015/04/17 12:17:37
Similarly regarding `node.isThisCall`. The class c
Siggi Cherem (dart-lang)
2015/04/17 16:38:23
Done.
|
setter = reportAndCreateErroneousElement( |
node.selector, target.name, MessageKind.ASSIGNING_METHOD, |
const {}); |
} else { |
- // For instance methods we don't report a warning here because the |
- // type checker will detect this as well and report a better error |
- // message with the context of the containing class. |
+ // For implicit instance methods we don't report a warning here |
+ // because the type checker will detect this as well and report a |
+ // better error message with the context of the containing class. |
} |
registry.registerThrowNoSuchMethod(); |
if (node.isSuperCall) registry.registerSuperNoSuchMethod(); |
Johnni Winther
2015/04/17 12:17:37
I would special case super calls here, creating an
Siggi Cherem (dart-lang)
2015/04/17 16:38:24
Done.
|