| 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 'package:expect/expect.dart'; |
| 6 import | 6 import |
| 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' | 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' |
| 8 show ContainerTypeMask, TypeMask; | 8 show ContainerTypeMask, TypeMask; |
| 9 | 9 |
| 10 import 'compiler_helper.dart'; | 10 import 'compiler_helper.dart'; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 listUsedInLocal[0] = anInt; | 147 listUsedInLocal[0] = anInt; |
| 148 var a = listUsedInLocal; | 148 var a = listUsedInLocal; |
| 149 listUsedInLocal[1] = aDouble; | 149 listUsedInLocal[1] = aDouble; |
| 150 | 150 |
| 151 // At least use [listUnused] in a local to pretend it's used. | 151 // At least use [listUnused] in a local to pretend it's used. |
| 152 var b = listUnset; | 152 var b = listUnset; |
| 153 | 153 |
| 154 listOnlySetWithConstraint[0]++; | 154 listOnlySetWithConstraint[0]++; |
| 155 | 155 |
| 156 listEscapingInSetterValue[0] = anInt; | 156 listEscapingInSetterValue[0] = anInt; |
| 157 new A().callSetter = listEscapingInSetterValue; | 157 new A(null).callSetter = listEscapingInSetterValue; |
| 158 | 158 |
| 159 listEscapingInIndex[0] = anInt; | 159 listEscapingInIndex[0] = anInt; |
| 160 new A()[listEscapingInIndex]; | 160 new A(null)[listEscapingInIndex]; |
| 161 | 161 |
| 162 new A()[listEscapingInIndexSet] = 42; | 162 new A(null)[listEscapingInIndexSet] = 42; |
| 163 | 163 |
| 164 new A()[listEscapingTwiceInIndexSet] = listEscapingTwiceInIndexSet; | 164 new A(null)[listEscapingTwiceInIndexSet] = listEscapingTwiceInIndexSet; |
| 165 | 165 |
| 166 listPassedAsOptionalParameter[0] = anInt; | 166 listPassedAsOptionalParameter[0] = anInt; |
| 167 takeOptional(listPassedAsOptionalParameter); | 167 takeOptional(listPassedAsOptionalParameter); |
| 168 | 168 |
| 169 listPassedAsNamedParameter[0] = anInt; | 169 listPassedAsNamedParameter[0] = anInt; |
| 170 takeNamed(list: listPassedAsNamedParameter); | 170 takeNamed(list: listPassedAsNamedParameter); |
| 171 | 171 |
| 172 listSetInNonFinalField[0] = anInt; | 172 listSetInNonFinalField[0] = anInt; |
| 173 new B(listSetInNonFinalField); | 173 new B(listSetInNonFinalField); |
| 174 | 174 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 checkType('listReturnedFromClosure', typesTask.dynamicType); | 222 checkType('listReturnedFromClosure', typesTask.dynamicType); |
| 223 checkType('listUsedWithNonOkSelector', typesTask.dynamicType); | 223 checkType('listUsedWithNonOkSelector', typesTask.dynamicType); |
| 224 checkType('listPassedAsOptionalParameter', typesTask.dynamicType); | 224 checkType('listPassedAsOptionalParameter', typesTask.dynamicType); |
| 225 checkType('listPassedAsNamedParameter', typesTask.dynamicType); | 225 checkType('listPassedAsNamedParameter', typesTask.dynamicType); |
| 226 | 226 |
| 227 if (!allocation.contains('filled')) { | 227 if (!allocation.contains('filled')) { |
| 228 checkType('listUnset', new TypeMask.nonNullEmpty()); | 228 checkType('listUnset', new TypeMask.nonNullEmpty()); |
| 229 checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty()); | 229 checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty()); |
| 230 } | 230 } |
| 231 } | 231 } |
| OLD | NEW |