Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
index 718a8cb57c210f89b9bfb551087f08c55ee4dc5e..39863f74331884e6be69d3f5be3c8853450c643f 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
@@ -3443,7 +3443,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
visitNewExpression(NewExpression node) { |
Element element = elements[node.send]; |
- if (!Elements.isErroneousElement(element)) { |
+ if (!Elements.isErroneousElement(element) && |
+ !Elements.isMalformedElement(element)) { |
ngeoffray
2012/11/27 09:37:35
!Elements.isUnresolved ?
aam-me
2012/11/28 01:49:47
Yes, agree. Good idea.
|
FunctionElement function = element; |
element = function.redirectionTarget; |
} |
@@ -3465,6 +3466,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
ConstantHandler handler = compiler.constantHandler; |
Constant constant = handler.compileNodeWithDefinitions(node, elements); |
stack.add(graph.addConstant(constant)); |
+ } else if (Elements.isMalformedElement(element)) { |
+ Message message = |
+ MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER.message([element]); |
+ generateRuntimeError(node.send, message.toString()); |
} else { |
visitNewSend(node.send, elements.getType(node)); |
} |