Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014, 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 we give up on tracing a function if one of its closurizations | |
| 6 // escapes tracing. | |
| 7 | |
| 8 class A { | |
| 9 var _boo = 22; | |
| 10 get boo { | |
| 11 return _boo; | |
| 12 return; | |
| 13 } | |
| 14 } | |
| 15 | |
| 16 class B { | |
| 17 var _bar = 42; | |
| 18 get boo { | |
| 19 return _bar; | |
| 20 return; | |
| 21 } | |
| 22 } | |
| 23 | |
| 24 class Holder { | |
| 25 tearMe(x) => x.boo; | |
| 26 } | |
| 27 | |
| 28 var list = []; | |
| 29 | |
| 30 main () { | |
| 31 var holder = new Holder(); | |
| 32 var hide = ((X) => X)(holder.tearMe); | |
| 33 hide(new A()); | |
| 34 list.add(holder.tearMe); | |
| 35 var x = list[0]; | |
| 36 x(new B()); | |
| 37 } | |
| OLD | NEW |