| Index: sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| index cdd5f8c9efe38b334742d82d708d857a892a4e95..856eaa5f9d713770a0488d7a596d959ce161040c 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
|
| @@ -335,16 +335,13 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| return currentClass.supertype;
|
| } else {
|
| Element element = elements[node];
|
| - if (element != null) {
|
| - assert(invariant(node, element.isVariable() || element.isParameter(),
|
| - message: 'Unexpected context element ${element}'));
|
| - return element.computeType(compiler);
|
| - }
|
| -
|
| - assert(invariant(node, elements.currentElement.isField(),
|
| - message: 'Unexpected context element ${elements.currentElement}'));
|
| - // This is an identifier of a field declaration.
|
| - return types.dynamicType;
|
| + assert(invariant(node, element != null,
|
| + message: 'Missing element for identifier'));
|
| + assert(invariant(node, element.isVariable() ||
|
| + element.isParameter() ||
|
| + element.isField(),
|
| + message: 'Unexpected context element ${element}'));
|
| + return element.computeType(compiler);
|
| }
|
| }
|
|
|
|
|