OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// This file declares a "shadow hierarchy" of concrete classes which extend | 5 /// This file declares a "shadow hierarchy" of concrete classes which extend |
6 /// the kernel class hierarchy, adding methods and fields needed by the | 6 /// the kernel class hierarchy, adding methods and fields needed by the |
7 /// BodyBuilder. | 7 /// BodyBuilder. |
8 /// | 8 /// |
9 /// Instances of these classes may be created using the factory methods in | 9 /// Instances of these classes may be created using the factory methods in |
10 /// `ast_factory.dart`. | 10 /// `ast_factory.dart`. |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 return inferrer.inferMethodInvocation( | 416 return inferrer.inferMethodInvocation( |
417 typeContext, | 417 typeContext, |
418 typeNeeded, | 418 typeNeeded, |
419 fileOffset, | 419 fileOffset, |
420 receiver, | 420 receiver, |
421 name, | 421 name, |
422 _getExplicitTypeArguments(arguments), | 422 _getExplicitTypeArguments(arguments), |
423 _forEachArgument(arguments), (types) { | 423 _forEachArgument(arguments), (types) { |
424 arguments.types.clear(); | 424 arguments.types.clear(); |
425 arguments.types.addAll(types); | 425 arguments.types.addAll(types); |
| 426 }, (target) { |
| 427 if (!inferrer.strongMode) { |
| 428 // Our non-strong golden files currently don't include interface |
| 429 // targets, so we can't store the interface target without causing tests |
| 430 // to fail. TODO(paulberry): fix this. |
| 431 return; |
| 432 } |
| 433 interfaceTarget = target; |
426 }); | 434 }); |
427 } | 435 } |
428 } | 436 } |
429 | 437 |
430 /// Shadow object for [Not]. | 438 /// Shadow object for [Not]. |
431 class KernelNot extends Not implements KernelExpression { | 439 class KernelNot extends Not implements KernelExpression { |
432 KernelNot(Expression operand) : super(operand); | 440 KernelNot(Expression operand) : super(operand); |
433 | 441 |
434 @override | 442 @override |
435 DartType _inferExpression( | 443 DartType _inferExpression( |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 : super(variable, value); | 954 : super(variable, value); |
947 | 955 |
948 @override | 956 @override |
949 DartType _inferExpression( | 957 DartType _inferExpression( |
950 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 958 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
951 var variable = this.variable as KernelVariableDeclaration; | 959 var variable = this.variable as KernelVariableDeclaration; |
952 return inferrer.inferVariableSet( | 960 return inferrer.inferVariableSet( |
953 typeContext, typeNeeded, variable._declaredType, value); | 961 typeContext, typeNeeded, variable._declaredType, value); |
954 } | 962 } |
955 } | 963 } |
OLD | NEW |