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

Side by Side Diff: tests/compiler/dart2js_native/super_property_test.dart

Issue 383413003: Add @Native(...) annotation for native class names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:_js_helper";
5 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
6 7
7 // Tests super setter where the HInvokeSuper is using interceptor aka 8 // Tests super setter where the HInvokeSuper is using interceptor aka
8 // explicit-receiver calling convention. 9 // explicit-receiver calling convention.
9 10
10 class A native "A" { 11 @Native("A")
12 class A {
11 var foo; 13 var foo;
12 get_foo() => foo; 14 get_foo() => foo;
13 set bar(value) => foo = value; 15 set bar(value) => foo = value;
14 } 16 }
15 17
16 class B extends A native "B" { 18 @Native("B")
19 class B extends A {
17 set foo(value) { 20 set foo(value) {
18 super.foo = value; 21 super.foo = value;
19 } 22 }
20 get foo => super.foo; 23 get foo => super.foo;
21 } 24 }
22 25
23 class C { 26 class C {
24 var foo; 27 var foo;
25 get_foo() => foo; 28 get_foo() => foo;
26 set bar(value) => foo = value; 29 set bar(value) => foo = value;
(...skipping 29 matching lines...) Expand all
56 59
57 main() { 60 main() {
58 setup(); 61 setup();
59 var things = [makeA(), makeB(), new C(), new D()]; 62 var things = [makeA(), makeB(), new C(), new D()];
60 var test = testThing; 63 var test = testThing;
61 test(things[0]); 64 test(things[0]);
62 test(things[1]); 65 test(things[1]);
63 test(things[2]); 66 test(things[2]);
64 test(things[3]); 67 test(things[3]);
65 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698