Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| index ae787bed30938ecd494655ab1a7b62fc540611b1..4063da313655a9e3f35515d13fb693b996e2adc2 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| @@ -106,10 +106,10 @@ class TreeElementMapping implements TreeElements { |
| return selectors[node.assignmentOperator]; |
| } |
| - // The following methods set selectors on the "for in" node. Since |
| - // we're using three selectors, we need to use children of the node, |
| - // and we arbitrarily choose which ones. |
| - |
| + // The following methods set selectors on the "for in" node. Since |
| + // we're using three selectors, we need to use children of the node, |
| + // and we arbitrarily choose which ones. |
|
ngeoffray
2013/05/30 06:53:01
Thank you :)
|
| + |
| Selector setIteratorSelector(ForIn node, Selector selector) { |
| selectors[node] = selector; |
| } |
| @@ -121,7 +121,7 @@ class TreeElementMapping implements TreeElements { |
| Selector setMoveNextSelector(ForIn node, Selector selector) { |
| selectors[node.forToken] = selector; |
| } |
| - |
| + |
| Selector getMoveNextSelector(ForIn node) { |
| return selectors[node.forToken]; |
| } |
| @@ -602,6 +602,14 @@ class ResolverTask extends CompilerTask { |
| ClassElement mixin = mixinApplication.mixin; |
| if (mixin == null) return; |
| + // Check that we're not trying to use Object as a mixin. |
| + if (mixin.superclass == null) { |
| + compiler.reportErrorCode(mixinApplication, |
| + MessageKind.ILLEGAL_MIXIN_OBJECT); |
| + // Avoid reporting additional errors for the Object class. |
|
ngeoffray
2013/05/30 06:53:01
I'd drop "for the Object class", it confused me.
|
| + return; |
| + } |
| + |
| // Check that the mixed in class has Object as its superclass. |
| if (!mixin.superclass.isObject(compiler)) { |
| compiler.reportErrorCode(mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS); |