| 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 3984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3995 ''' | 3995 ''' |
| 3996 class C<T> { | 3996 class C<T> { |
| 3997 final x; | 3997 final x; |
| 3998 const C() : x = T; | 3998 const C() : x = T; |
| 3999 } | 3999 } |
| 4000 ''', | 4000 ''', |
| 4001 allowErrors: true); | 4001 allowErrors: true); |
| 4002 checkConstCycle('C', hasCycle: false); | 4002 checkConstCycle('C', hasCycle: false); |
| 4003 } | 4003 } |
| 4004 | 4004 |
| 4005 test_constructorCycle_referenceToGenericParameter_asSupertype() { |
| 4006 // It's not valid Dart but we need to make sure it doesn't crash |
| 4007 // summary generation. |
| 4008 serializeLibraryText( |
| 4009 ''' |
| 4010 class C<T> extends T { |
| 4011 const C(); |
| 4012 } |
| 4013 ''', |
| 4014 allowErrors: true); |
| 4015 checkConstCycle('C', hasCycle: false); |
| 4016 } |
| 4017 |
| 4005 test_constructorCycle_referenceToStaticMethod_inOtherClass() { | 4018 test_constructorCycle_referenceToStaticMethod_inOtherClass() { |
| 4006 serializeLibraryText(''' | 4019 serializeLibraryText(''' |
| 4007 class C { | 4020 class C { |
| 4008 final x; | 4021 final x; |
| 4009 const C() : x = D.f; | 4022 const C() : x = D.f; |
| 4010 } | 4023 } |
| 4011 class D { | 4024 class D { |
| 4012 static void f() {} | 4025 static void f() {} |
| 4013 } | 4026 } |
| 4014 '''); | 4027 '''); |
| (...skipping 4051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8066 class _PrefixExpectation { | 8079 class _PrefixExpectation { |
| 8067 final ReferenceKind kind; | 8080 final ReferenceKind kind; |
| 8068 final String name; | 8081 final String name; |
| 8069 final String absoluteUri; | 8082 final String absoluteUri; |
| 8070 final String relativeUri; | 8083 final String relativeUri; |
| 8071 final int numTypeParameters; | 8084 final int numTypeParameters; |
| 8072 | 8085 |
| 8073 _PrefixExpectation(this.kind, this.name, | 8086 _PrefixExpectation(this.kind, this.name, |
| 8074 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 8087 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); |
| 8075 } | 8088 } |
| OLD | NEW |