Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 1836033002: Fix a corner case of building summaries from ASTs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698