Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
index d7a6e08773506db04b2cad3f8b7b518dc96bc474..c9f70553c2adb14c57d0dd8c56cd76d2f8f79e43 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
@@ -1301,14 +1301,20 @@ class KernelNot extends Not implements KernelExpression { |
@override |
void _collectDependencies(KernelDependencyCollector collector) { |
- // No inference dependencies. |
+ collector.collectDependencies(operand); |
} |
@override |
DartType _inferExpression( |
KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
- // TODO(scheglov): implement. |
- return typeNeeded ? const DynamicType() : null; |
+ typeNeeded = inferrer.listener.notEnter(this, typeContext) || typeNeeded; |
+ // First infer the receiver so we can look up the method that was invoked. |
+ inferrer.inferExpression( |
+ operand, inferrer.coreTypes.boolClass.rawType, false); |
scheglov
2017/06/12 23:29:28
Maybe extract boolType into a local variable.
Paul Berry
2017/06/13 00:39:54
Done.
|
+ DartType inferredType = |
+ typeNeeded ? inferrer.coreTypes.boolClass.rawType : null; |
+ inferrer.listener.notExit(this, inferredType); |
+ return inferredType; |
} |
} |