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

Unified Diff: tests/language_2/unbound_getter_test.dart

Issue 3008723002: Migrate block 163 to Dart 2.0. (Closed)
Patch Set: Created 3 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: tests/language_2/unbound_getter_test.dart
diff --git a/tests/language_strong/unresolved_in_factory_negative_test.dart b/tests/language_2/unbound_getter_test.dart
similarity index 64%
rename from tests/language_strong/unresolved_in_factory_negative_test.dart
rename to tests/language_2/unbound_getter_test.dart
index 8166ac8f510bf5356ed452ec5ea23d2879116826..bb1a7b3e48b98c827903b34656c877dfe3bbd3eb 100644
--- a/tests/language_strong/unresolved_in_factory_negative_test.dart
+++ b/tests/language_2/unbound_getter_test.dart
@@ -1,16 +1,14 @@
// Copyright (c) 2011, 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.
-
-// Test that an unresolved method call in a factory is a resolution
-// error.
+// Verify that an unbound getter is properly resolved at runtime.
class A {
- factory A() {
- foo();
+ const A();
+ foo() {
+ return y; /*@compile-error=unspecified*/
}
}
main() {
Lasse Reichstein Nielsen 2017/08/29 08:49:44 Do `new A().foo()` here just to be sure. I'm not
jcollins 2017/08/29 17:39:10 Done.
- new A();
}

Powered by Google App Engine
This is Rietveld 408576698