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

Side by Side Diff: tests/language/invocation_mirror2_test.dart

Issue 114713002: VM: Support calling through getters in InstanceMirror.delegate. Implement without accessing private… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync Created 7 years 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
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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:mirrors" show reflect; 5 import "dart:mirrors" show reflect;
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 class GetName { 8 class GetName {
9 set flif(_) => "flif="; 9 set flif(_) => "flif=";
10 } 10 }
11 11
12 String getName(im) => reflect(new GetName()).delegate(im); 12 int getName(im) => reflect(new GetName()).delegate(im);
13 13
14 class C { 14 class C {
15 var im; 15 var im;
16 noSuchMethod(im) => this.im = im; 16 noSuchMethod(im) => this.im = im;
17 flif() {} 17 flif() {}
18 } 18 }
19 19
20 main() { 20 main() {
21 var c = new C(); 21 var c = new C();
22 c.flif = 42; 22 c.flif = 42;
23 Expect.equals('flif=', getName(c.im)); 23 Expect.equals(42, getName(c.im));
24 Expect.equals(42, c.im.positionalArguments[0]); 24 Expect.equals(42, c.im.positionalArguments[0]);
25 } 25 }
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698