Skip to content

Commit 22866b6

Browse files
bwilkersoncommit-bot@chromium.org
authored andcommitted
Add test of ambiguous exports to verify an edge case
Change-Id: I9c9e6019e314474c26165dee6a93eb35054389ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112748 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent a9f6e03 commit 22866b6

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AmbiguousExportWithExtensionMethodsTest extends DriverResolutionTest {
4141
..contextFeatures = new FeatureSet.forTesting(
4242
sdkVersion: '2.3.0', additionalFeatures: [Feature.extension_methods]);
4343

44-
test_extension() async {
44+
test_extensions_bothExported() async {
4545
newFile('/test/lib/lib1.dart', content: r'''
4646
extension E on String {}
4747
''');
@@ -55,4 +55,15 @@ export 'lib2.dart';
5555
error(CompileTimeErrorCode.AMBIGUOUS_EXPORT, 20, 19),
5656
]);
5757
}
58+
59+
test_extensions_localAndExported() async {
60+
newFile('/test/lib/lib1.dart', content: r'''
61+
extension E on String {}
62+
''');
63+
await assertNoErrorsInCode(r'''
64+
export 'lib1.dart';
65+
66+
extension E on String {}
67+
''');
68+
}
5869
}

0 commit comments

Comments
 (0)