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

Side by Side Diff: test/codegen/methods.dart

Issue 1138793002: Tag closures with their types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: More comment fixes Created 5 years, 7 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
« no previous file with comments | « test/codegen/expect/try_catch.js ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library methods; 5 library methods;
6 6
7 class A { 7 class A {
8 int x() => 42; 8 int x() => 42;
9 9
10 int y(int a) { 10 int y(int a) {
(...skipping 29 matching lines...) Expand all
40 call(x) => print('hello from $x'); 40 call(x) => print('hello from $x');
41 } 41 }
42 class Foo { 42 class Foo {
43 final Bar bar = new Bar(); 43 final Bar bar = new Bar();
44 } 44 }
45 45
46 test() { 46 test() {
47 // looks like a method but is actually f.bar.call(...) 47 // looks like a method but is actually f.bar.call(...)
48 var f = new Foo(); 48 var f = new Foo();
49 f.bar("Bar's call method!"); 49 f.bar("Bar's call method!");
50
51 // Tear-off
52 A a = new A();
53 var g = a.x;
54
55 // Dynamic Tear-off
56 dynamic aa = new A();
57 var h = aa.x;
50 } 58 }
OLDNEW
« no previous file with comments | « test/codegen/expect/try_catch.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698