Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1a8b1bf

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Fix test_bottom_reference_shared.
At some point this test regressed so that it no longer tested the behavior it purported to test. The underlying behavior is correct; the test just had to be fixed. Change-Id: Ia54cb205b8f1a6062f4078009d24d865d70a6bac Reviewed-on: https://dart-review.googlesource.com/74921 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent 7bc5c55 commit 1a8b1bf

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ main() {
1616
@reflectiveTest
1717
class SummarizeAstOnePhaseTest extends SummaryBlackBoxTestStrategyOnePhase
1818
with SummaryTestCases {
19-
@override
20-
@failingTest
21-
test_bottom_reference_shared() {
22-
super.test_bottom_reference_shared();
23-
}
24-
2519
@override
2620
@failingTest
2721
test_closure_executable_with_bottom_return_type() {

pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ main() {
1616
@reflectiveTest
1717
class LinkedSummarizeAstStrongTest extends SummaryBlackBoxTestStrategyTwoPhase
1818
with SummaryTestCases {
19-
@override
20-
@failingTest
21-
test_bottom_reference_shared() {
22-
super.test_bottom_reference_shared();
23-
}
24-
2519
@override
2620
@failingTest
2721
test_closure_executable_with_imported_return_type() {

pkg/analyzer/test/src/summary/summary_common.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,11 +930,13 @@ main() {
930930
}
931931
// The synthetic executables for both `x` and `y` have type `() => `Bottom`.
932932
// Verify that they both use the same reference to `Bottom`.
933-
serializeLibraryText('int x = null; int y = null;');
933+
serializeLibraryText('var x = throw null; var y = throw null;');
934934
EntityRef xInitializerReturnType =
935935
getTypeRefForSlot(findVariable('x').initializer.inferredReturnTypeSlot);
936936
EntityRef yInitializerReturnType =
937937
getTypeRefForSlot(findVariable('y').initializer.inferredReturnTypeSlot);
938+
checkLinkedTypeRef(xInitializerReturnType, null, '*bottom*');
939+
checkLinkedTypeRef(yInitializerReturnType, null, '*bottom*');
938940
expect(xInitializerReturnType.reference, yInitializerReturnType.reference);
939941
}
940942

0 commit comments

Comments
 (0)