| Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 24023)
|
| +++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
|
| @@ -3340,11 +3340,15 @@
|
| if (Elements.isFixedListConstructorCall(
|
| originalElement, send, compiler)) {
|
| isListConstructor = true;
|
| - return backend.fixedArrayType;
|
| + HType inferred =
|
| + new HType.inferredForNode(currentElement, node, compiler);
|
| + return inferred.isUnknown() ? backend.fixedArrayType : inferred;
|
| } else if (Elements.isGrowableListConstructorCall(
|
| originalElement, send, compiler)) {
|
| isListConstructor = true;
|
| - return backend.extendableArrayType;
|
| + HType inferred =
|
| + new HType.inferredForNode(currentElement, node, compiler);
|
| + return inferred.isUnknown() ? backend.extendableArrayType : inferred;
|
| } else if (element.isGenerativeConstructor()) {
|
| ClassElement cls = element.getEnclosingClass();
|
| return new HType.nonNullExact(cls.thisType, compiler);
|
| @@ -4102,7 +4106,10 @@
|
| visit(link.head);
|
| inputs.add(pop());
|
| }
|
| - push(buildLiteralList(inputs));
|
| + HInstruction instruction = buildLiteralList(inputs);
|
| + HType type = new HType.inferredForNode(currentElement, node, compiler);
|
| + if (!type.isUnknown()) instruction.instructionType = type;
|
| + push(instruction);
|
| }
|
|
|
| visitConditional(Conditional node) {
|
|
|