OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013, 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 for static warnings for member access on classes with @proxy annotation. |
| 6 |
| 7 class NonProxy {} |
| 8 |
| 9 @proxy |
| 10 class Proxy {} |
| 11 |
| 12 const alias = proxy; |
| 13 |
| 14 @alias |
| 15 class AliasProxy {} |
| 16 |
| 17 main() { |
| 18 try { new NonProxy().foo; } catch (e) {} /// 01: static type warning |
| 19 try { new NonProxy().foo(); } catch (e) {} /// 02: static type warning |
| 20 |
| 21 try { new Proxy().foo; } catch (e) {} /// 03: ok |
| 22 try { new Proxy().foo(); } catch (e) {} /// 04: ok |
| 23 |
| 24 try { new AliasProxy().foo; } catch (e) {} /// 05: ok |
| 25 try { new AliasProxy().foo(); } catch (e) {} /// 06: ok |
| 26 } |
OLD | NEW |