| 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 setters cannot have defined, non-void return types. |
| 6 // Note: The language specification specifies the absence of a type means |
| 7 // it is dynamic, however you cannot specify dynamic. |
| 8 |
| 9 class A { |
| 10 set foo(x) {} |
| 11 void set bar(x) {} |
| 12 Dynamic set baz(x) {} /// 01: static type error |
| 13 bool set bob(x) {} /// 02: static type error |
| 14 } |
| 15 |
| 16 main() { |
| 17 new A(); |
| 18 } |
| OLD | NEW |