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

Side by Side Diff: tests/language_strong/super_tearoff_test.dart

Issue 2944003003: Fixes for super tearoff in constructor (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 import 'package:expect/expect.dart';
Jennifer Messerly 2017/06/19 20:24:52 this needs a copyright notice alternatively, I th
vsm 2017/06/19 20:36:20 Done.
2
3 int invoke(int f()) => f();
4
5 class A {
6 int foo() {
7 return 42;
8 }
9 }
10
11 class B extends A {
12 int x;
13
14 B() {
15 x = invoke(super.foo);
16 }
17
18 int foo() {
19 return -1;
20 }
21 }
22
23 void main() {
24 var b = new B();
25 Expect.equals(42, b.x);
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698