OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; |
| 6 |
| 7 // When attempting to call a nonexistent static method, getter or setter, check |
| 8 // that a compile error is reported. |
| 9 |
| 10 class C {} |
| 11 |
| 12 class D { |
| 13 get hest => 1; //# 04: continued |
| 14 set hest(val) {} //# 05: continued |
| 15 } |
| 16 |
| 17 get fisk => 2; //# 09: continued |
| 18 set fisk(val) {} //# 10: continued |
| 19 |
| 20 main() { |
| 21 C.hest = 1; //# 01: compile-time error |
| 22 C.hest; //# 02: compile-time error |
| 23 C.hest(); //# 03: compile-time error |
| 24 |
| 25 D.hest = 1; //# 04: compile-time error |
| 26 D.hest; //# 05: compile-time error |
| 27 fisk = 1; //# 06: compile-time error |
| 28 fisk; //# 07: compile-time error |
| 29 fisk(); //# 08: compile-time error |
| 30 fisk = 1; //# 09: compile-time error |
| 31 fisk; //# 10: compile-time error |
| 32 } |
OLD | NEW |