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

Unified Diff: pkg/analyzer/test/src/task/strong/inferred_type_test.dart

Issue 2217693003: fix #26552, improve null coalescing inference (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index 32000e99686c3ced31ac7b2e5660275db7477a37..386c8c10b87165e0095de1c4b6fcc08d7cd672d5 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -3616,6 +3616,15 @@ test1() {
''');
}
+ void test_nullCoalescingOperator() {
+ // Regression test for https://github.com/dart-lang/sdk/issues/26552
Leaf 2016/08/04 22:26:44 Can you put a case in here to test for when we do
Jennifer Messerly 2016/08/04 22:57:49 Done.
+ checkFile(r'''
+List<int> x;
+var y = x ?? /*info:INFERRED_TYPE_LITERAL*/[];
+List<int> z = y;
+ ''');
+ }
+
void test_nullLiteralShouldNotInferAsBottom() {
// Regression test for https://github.com/dart-lang/dev_compiler/issues/47
checkFile(r'''
« pkg/analyzer/lib/src/generated/resolver.dart ('K') | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698