| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 // |
| 5 // Test that a getter is evaluated after the arguments, when a getter is |
| 6 // for invoking a method. See chapter 'Method Invocation' in specification. |
| 7 |
| 8 var counter = 0; |
| 9 |
| 10 get a() { |
| 11 Expect.equals(1, counter); |
| 12 counter++; |
| 13 return (c) { }; |
| 14 } |
| 15 |
| 16 b() { |
| 17 Expect.equals(0, counter); |
| 18 counter++; |
| 19 return 1; |
| 20 } |
| 21 |
| 22 main() { |
| 23 a(b()); |
| 24 Expect.equals(2, counter); |
| 25 } |
| OLD | NEW |