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

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

Issue 2689573002: Fix export + local when the library is also exported. (Closed)
Patch Set: Created 3 years, 10 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/prelink.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 test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
9 import 'package:analyzer/dart/constant/value.dart'; 9 import 'package:analyzer/dart/constant/value.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 4393 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 ''' 4404 '''
4405 export 'a.dart'; 4405 export 'a.dart';
4406 class C {} 4406 class C {}
4407 '''); 4407 ''');
4408 checkLibrary(''' 4408 checkLibrary('''
4409 import 'c.dart'; 4409 import 'c.dart';
4410 C v = null; 4410 C v = null;
4411 '''); 4411 ''');
4412 } 4412 }
4413 4413
4414 test_nameConflict_exportedAndLocal_exported() {
4415 namesThatCannotBeResolved.add('V');
4416 addLibrarySource('/a.dart', 'class C {}');
4417 addLibrarySource(
4418 '/c.dart',
4419 '''
4420 export 'a.dart';
4421 class C {}
4422 ''');
4423 addLibrarySource('/d.dart', 'export "c.dart";');
4424 checkLibrary('''
4425 import 'd.dart';
4426 C v = null;
4427 ''');
4428 }
4429
4414 test_nameConflict_exportedAndParted() { 4430 test_nameConflict_exportedAndParted() {
4415 namesThatCannotBeResolved.add('V'); 4431 namesThatCannotBeResolved.add('V');
4416 addLibrarySource('/a.dart', 'class C {}'); 4432 addLibrarySource('/a.dart', 'class C {}');
4417 addLibrarySource( 4433 addLibrarySource(
4418 '/b.dart', 4434 '/b.dart',
4419 ''' 4435 '''
4420 part of lib; 4436 part of lib;
4421 class C {} 4437 class C {}
4422 '''); 4438 ''');
4423 addLibrarySource( 4439 addLibrarySource(
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 fail('Unexpectedly tried to get unlinked summary for $uri'); 5257 fail('Unexpectedly tried to get unlinked summary for $uri');
5242 } 5258 }
5243 return serializedUnit; 5259 return serializedUnit;
5244 } 5260 }
5245 5261
5246 @override 5262 @override
5247 bool hasLibrarySummary(String uri) { 5263 bool hasLibrarySummary(String uri) {
5248 return true; 5264 return true;
5249 } 5265 }
5250 } 5266 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698