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

Unified Diff: tests/compiler/dart2js/inference/data/locals.dart

Issue 3009043002: Handle variable declarations in inferrer (Closed)
Patch Set: Created 3 years, 3 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: tests/compiler/dart2js/inference/data/locals.dart
diff --git a/tests/compiler/dart2js/inference/data/locals.dart b/tests/compiler/dart2js/inference/data/locals.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6b19bc3039762a03209ce074b211bab2f6ac931e
--- /dev/null
+++ b/tests/compiler/dart2js/inference/data/locals.dart
@@ -0,0 +1,21 @@
+// 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.
+
+/*element: main:[null]*/
+main() {
+ uninitializedLocal();
+ initializedLocal();
+}
+
+/*element: uninitializedLocal:[null]*/
+uninitializedLocal() {
+ var local;
+ return local;
+}
+
+/*element: initializedLocal:[exact=JSUInt31]*/
+initializedLocal() {
+ var local = 0;
+ return local;
+}

Powered by Google App Engine
This is Rietveld 408576698