Fix test_variable_final_top_level_untyped.
This test was previously assuming that variables requiring top level
type inference would have their body expressions encoded in the
unlinked summary; with one-phase summary generation this is no longer
the case.
Change-Id: I47b4f81926eb4bc667a201ba83673e3e0db4c8cb
Reviewed-on: https://dart-review.googlesource.com/74924
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart
index 5640c3f..65d5377 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart
@@ -99,10 +99,4 @@
test_syntheticFunctionType_inGenericClass() {
super.test_syntheticFunctionType_inGenericClass();
}
-
- @override
- @failingTest
- test_variable_final_top_level_untyped() {
- super.test_variable_final_top_level_untyped();
- }
}
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 1c26903..bdc8900 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -9834,8 +9834,10 @@
}
test_variable_final_top_level_untyped() {
+ if (skipFullyLinkedData) return;
UnlinkedVariable variable = serializeVariableText('final v = 0;');
- expect(variable.initializer.bodyExpr, isNotNull);
+ var typeRef = getTypeRefForSlot(variable.inferredTypeSlot);
+ checkLinkedTypeRef(typeRef, 'dart:core', 'int');
}
test_variable_implicit_dynamic() {