| 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 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 | 1443 |
| 1444 @override | 1444 @override |
| 1445 void _collectDependencies(KernelDependencyCollector collector) { | 1445 void _collectDependencies(KernelDependencyCollector collector) { |
| 1446 // Null aware expressions are not immediately evident. | 1446 // Null aware expressions are not immediately evident. |
| 1447 collector.recordNotImmediatelyEvident(fileOffset); | 1447 collector.recordNotImmediatelyEvident(fileOffset); |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 @override | 1450 @override |
| 1451 DartType _inferExpression( | 1451 DartType _inferExpression( |
| 1452 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { | 1452 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { |
| 1453 return inferrer.inferPropertyGet(this, variable.initializer, fileOffset, | 1453 var inferredType = inferrer.inferPropertyGet(this, variable.initializer, |
| 1454 _desugaredGet, typeContext, typeNeeded); | 1454 fileOffset, _desugaredGet, typeContext, true, |
| 1455 receiverVariable: variable); |
| 1456 body.staticType = inferredType; |
| 1457 return inferredType; |
| 1455 } | 1458 } |
| 1456 } | 1459 } |
| 1457 | 1460 |
| 1458 /// Concrete shadow object representing a null literal in kernel form. | 1461 /// Concrete shadow object representing a null literal in kernel form. |
| 1459 class KernelNullLiteral extends NullLiteral implements KernelExpression { | 1462 class KernelNullLiteral extends NullLiteral implements KernelExpression { |
| 1460 @override | 1463 @override |
| 1461 void _collectDependencies(KernelDependencyCollector collector) { | 1464 void _collectDependencies(KernelDependencyCollector collector) { |
| 1462 // No inference dependencies. | 1465 // No inference dependencies. |
| 1463 } | 1466 } |
| 1464 | 1467 |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2283 } | 2286 } |
| 2284 | 2287 |
| 2285 transformChildren(v) { | 2288 transformChildren(v) { |
| 2286 return internalError("Internal error: Unsupported operation."); | 2289 return internalError("Internal error: Unsupported operation."); |
| 2287 } | 2290 } |
| 2288 | 2291 |
| 2289 visitChildren(v) { | 2292 visitChildren(v) { |
| 2290 return internalError("Internal error: Unsupported operation."); | 2293 return internalError("Internal error: Unsupported operation."); |
| 2291 } | 2294 } |
| 2292 } | 2295 } |
| OLD | NEW |