| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.test.src.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/dart/scanner/reader.dart'; | 10 import 'package:analyzer/src/dart/scanner/reader.dart'; |
| (...skipping 4161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4172 ''' | 4172 ''' |
| 4173 class C { | 4173 class C { |
| 4174 final x = const C(); | 4174 final x = const C(); |
| 4175 const C(); | 4175 const C(); |
| 4176 } | 4176 } |
| 4177 ''', | 4177 ''', |
| 4178 allowErrors: true); | 4178 allowErrors: true); |
| 4179 checkConstCycle('C'); | 4179 checkConstCycle('C'); |
| 4180 } | 4180 } |
| 4181 | 4181 |
| 4182 test_constructorCycle_viaLength() { |
| 4183 // It's not valid Dart but we need to make sure it doesn't crash |
| 4184 // summary generation. |
| 4185 serializeLibraryText( |
| 4186 ''' |
| 4187 class C { |
| 4188 final x; |
| 4189 const C() : x = y.length; |
| 4190 } |
| 4191 const y = const C(); |
| 4192 ''', |
| 4193 allowErrors: true); |
| 4194 checkConstCycle('C'); |
| 4195 } |
| 4196 |
| 4182 test_constructorCycle_viaNamedConstructor() { | 4197 test_constructorCycle_viaNamedConstructor() { |
| 4183 serializeLibraryText(''' | 4198 serializeLibraryText(''' |
| 4184 class C { | 4199 class C { |
| 4185 final x; | 4200 final x; |
| 4186 const C() : x = const D.named(); | 4201 const C() : x = const D.named(); |
| 4187 } | 4202 } |
| 4188 class D { | 4203 class D { |
| 4189 final x; | 4204 final x; |
| 4190 const D.named() : x = const C(); | 4205 const D.named() : x = const C(); |
| 4191 } | 4206 } |
| (...skipping 4069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8261 class _PrefixExpectation { | 8276 class _PrefixExpectation { |
| 8262 final ReferenceKind kind; | 8277 final ReferenceKind kind; |
| 8263 final String name; | 8278 final String name; |
| 8264 final String absoluteUri; | 8279 final String absoluteUri; |
| 8265 final String relativeUri; | 8280 final String relativeUri; |
| 8266 final int numTypeParameters; | 8281 final int numTypeParameters; |
| 8267 | 8282 |
| 8268 _PrefixExpectation(this.kind, this.name, | 8283 _PrefixExpectation(this.kind, this.name, |
| 8269 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 8284 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); |
| 8270 } | 8285 } |
| OLD | NEW |