Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/builder.dart |
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
| index 2dec2eea53a8afd213efbd081024c1e94aea7938..151ca61ce61253bef3d3591ffea371280fe9b630 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -3247,7 +3247,7 @@ class SsaBuilder extends ast.Visitor |
| }); |
| TypeMask type = |
| - new TypeMask.nonNullExact(coreClasses.functionClass, compiler.world); |
| + new TypeMask.nonNullSubtype(closureClassElement, compiler.world); |
|
sigurdm
2015/11/03 13:06:50
?
Johnni Winther
2015/11/03 13:20:02
Why not notNullExact?
herhut
2015/11/04 10:42:20
Hmm, not sure this works. I know that we introduce
Johnni Winther
2015/11/06 13:43:23
Update the closed world for the latter.
|
| push(new HForeignNew(closureClassElement, type, capturedVariables) |
| ..sourceInformation = sourceInformationBuilder.buildCreate(node)); |
| @@ -5074,7 +5074,12 @@ class SsaBuilder extends ast.Visitor |
| : inferred; |
| } else if (element.isGenerativeConstructor) { |
| ClassElement cls = element.enclosingClass; |
| - return new TypeMask.nonNullExact(cls.thisType.element, compiler.world); |
| + if (cls.isAbstract) { |
| + // An error will be thrown. |
| + return new TypeMask.nonNullEmpty(); |
| + } else { |
| + return new TypeMask.nonNullExact(cls.thisType.element, compiler.world); |
|
sigurdm
2015/11/03 13:06:50
long line
Johnni Winther
2015/11/06 13:43:23
Done.
|
| + } |
| } else { |
| return TypeMaskFactory.inferredReturnTypeForElement( |
| originalElement, compiler); |