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; |
+} |