| OLD | NEW |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 50 |
| 51 // Tear-off | 51 // Tear-off |
| 52 A a = new A(); | 52 A a = new A(); |
| 53 var g = a.x; | 53 var g = a.x; |
| 54 | 54 |
| 55 // Dynamic Tear-off | 55 // Dynamic Tear-off |
| 56 dynamic aa = new A(); | 56 dynamic aa = new A(); |
| 57 var h = aa.x; | 57 var h = aa.x; |
| 58 |
| 59 // Tear-off of object methods |
| 60 var ts = a.toString; |
| 61 var nsm = a.noSuchMethod; |
| 62 |
| 63 // Tear-off extension methods |
| 64 var c = "".padLeft; |
| 65 var r = (3.0).floor; |
| 58 } | 66 } |
| OLD | NEW |