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

Unified Diff: pkg/front_end/testcases/inference/conditional_lub.dart

Issue 2849213002: Add a strong mode implementation of LUB to fasta; use it to infer ?: (Closed)
Patch Set: Created 3 years, 8 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/front_end/testcases/inference/conditional_lub.dart
diff --git a/pkg/front_end/testcases/inference/conditional_lub.dart b/pkg/front_end/testcases/inference/conditional_lub.dart
new file mode 100644
index 0000000000000000000000000000000000000000..cab13164562a931326ea5d32c6c08aeb57f85425
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conditional_lub.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*@testedFeatures=inference*/
+library test;
+
+bool b = true;
+int x = 0;
+double y = 0.0;
+var /*@topType=num*/ z = b ? x : y;
ahe 2017/05/02 18:32:57 It's getting closer and closer to rocket science n
+
+main() {
+ var /*@type=num*/ z = b ? x : y;
+}

Powered by Google App Engine
This is Rietveld 408576698