| Index: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 20142)
|
| +++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
|
| @@ -108,6 +108,8 @@
|
| throw 'Unsupported operation';
|
| }
|
|
|
| + bool get isNullable => true;
|
| +
|
| String toString() => '$name sentinel type mask';
|
| }
|
|
|
| @@ -1048,6 +1050,17 @@
|
| // also return null.
|
| returnType = returnType.nullable();
|
| }
|
| +
|
| + if (analyzedElement.name == const SourceString('==')) {
|
| + // TODO(ngeoffray): Should this be done at the call site?
|
| + // When the argument passed in is null, we know we return a
|
| + // bool.
|
| + signature.forEachParameter((Element parameter) {
|
| + if (inferrer.typeOfElement(parameter).isNullable){
|
| + returnType = inferrer.computeLUB(returnType, inferrer.boolType);
|
| + }
|
| + });
|
| + }
|
| }
|
|
|
| if (analyzedElement == outermostElement) {
|
|
|