Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart (revision 29652) |
| +++ sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart (working copy) |
| @@ -197,7 +197,7 @@ |
| * return type. |
| * |
| * Note that a few elements of these kinds must be treated specially, |
| - * and they are dealt in [ElementTypeInformation.handleSpecialCase]: |
| + * and they are dealt in [ElementTypeInformation.handleSpecialCases]: |
| * |
| * - Parameters of closures, [noSuchMethod] and [call] instance |
| * methods: we currently do not infer types for those. |
| @@ -298,6 +298,17 @@ |
| } |
| } |
| } |
| + |
| + Compiler compiler = inferrer.compiler; |
| + if (element.declaration == compiler.intEnvironment) { |
| + giveUp(inferrer); |
|
kasperl
2013/10/31 09:11:51
Why do you give up in the int and bool case, but n
ngeoffray
2013/10/31 09:32:24
Good catch. I should actually give up for the stri
|
| + return compiler.typesTask.intType.nullable(); |
| + } else if (element.declaration == compiler.boolEnvironment) { |
| + giveUp(inferrer); |
| + return compiler.typesTask.boolType.nullable(); |
| + } else if (element.declaration == compiler.stringEnvironment) { |
| + return compiler.typesTask.stringType.nullable(); |
| + } |
| return null; |
| } |