| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'package:expect/expect.dart'; |
| 5 import 'compiler_helper.dart'; | 6 import 'compiler_helper.dart'; |
| 6 import 'parser_helper.dart'; | 7 import 'parser_helper.dart'; |
| 7 | 8 |
| 8 const String TEST = """ | 9 const String TEST = """ |
| 9 | 10 |
| 10 class A { | 11 class A { |
| 11 final intField; | 12 final intField; |
| 12 final giveUpField1; | 13 final giveUpField1; |
| 13 final giveUpField2; | 14 final giveUpField2; |
| 14 final fieldParameter; | 15 final fieldParameter; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 35 var element = cls.lookupLocalMember(buildSourceString(fieldName)); | 36 var element = cls.lookupLocalMember(buildSourceString(fieldName)); |
| 36 Expect.equals(type, typesInferrer.typeOf[element]); | 37 Expect.equals(type, typesInferrer.typeOf[element]); |
| 37 } | 38 } |
| 38 | 39 |
| 39 checkFieldTypeInClass('A', 'intField', typesInferrer.intType); | 40 checkFieldTypeInClass('A', 'intField', typesInferrer.intType); |
| 40 checkFieldTypeInClass('A', 'giveUpField1', | 41 checkFieldTypeInClass('A', 'giveUpField1', |
| 41 findTypeMask(compiler, 'Interceptor', 'nonNullSubclass')); | 42 findTypeMask(compiler, 'Interceptor', 'nonNullSubclass')); |
| 42 checkFieldTypeInClass('A', 'giveUpField2', typesInferrer.dynamicType); | 43 checkFieldTypeInClass('A', 'giveUpField2', typesInferrer.dynamicType); |
| 43 checkFieldTypeInClass('A', 'fieldParameter', typesInferrer.intType); | 44 checkFieldTypeInClass('A', 'fieldParameter', typesInferrer.intType); |
| 44 } | 45 } |
| OLD | NEW |