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

Unified Diff: tests/kernel/unsorted/closures_regression_test.dart

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (Closed)
Patch Set: address more comments Created 4 years, 2 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/kernel/unsorted/closures_regression_test.dart
diff --git a/tests/language/super_no_such_method2_test.dart b/tests/kernel/unsorted/closures_regression_test.dart
similarity index 52%
copy from tests/language/super_no_such_method2_test.dart
copy to tests/kernel/unsorted/closures_regression_test.dart
index cbd46216d66dafe494c47999b1ad7b637429b964..ac45e1bc4caf5dba4544555da463be3b0783577c 100644
--- a/tests/language/super_no_such_method2_test.dart
+++ b/tests/kernel/unsorted/closures_regression_test.dart
@@ -2,18 +2,21 @@
// 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.
-import 'package:expect/expect.dart';
+import 'expect.dart';
+f(fun) => fun();
class A {
- noSuchMethod(im) => 42;
-}
-
-class B extends A {
- noSuchMethod(im) => 87;
-
- get foo => super.foo; /// 01: static type warning
+ identity(arg) {
+ return f(() {
+ print(this);
+ return f(() {
+ return this;
+ });
+ });
+ }
}
main() {
- Expect.equals(42, new B().foo); /// 01: continued
-}
+ var a = new A();
+ Expect.isTrue(identical(a.identity(42), a));
+}

Powered by Google App Engine
This is Rietveld 408576698