| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Validate the following spec text from section 16.14.3 (Unqualified | 5 // Validate the following spec text from section 16.14.3 (Unqualified |
| 6 // invocation): | 6 // invocation): |
| 7 // An unqualifiedfunction invocation i has the form | 7 // An unqualifiedfunction invocation i has the form |
| 8 // id(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k), | 8 // id(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k), |
| 9 // where id is an identifier. | 9 // where id is an identifier. |
| 10 // If there exists a lexically visible declaration named id, let fid be the | 10 // If there exists a lexically visible declaration named id, let fid be the |
| 11 // innermost such declaration. Then: | 11 // innermost such declaration. Then: |
| 12 // - If fid is a prefix object, a compile-time error occurs. | 12 // - If fid is a prefix object, a compile-time error occurs. |
| 13 | 13 |
| 14 import "empty_library.dart" as p; | 14 import "empty_library.dart" as p; |
| 15 | 15 |
| 16 class Base { | 16 class Base { |
| 17 void p() {} | 17 void p() {} |
| 18 } | 18 } |
| 19 | 19 |
| 20 class Derived extends Base { | 20 class Derived extends Base { |
| 21 void f() { | 21 void f() { |
| 22 p(); /// 01: compile-time error | 22 p(); //# 01: compile-time error |
| 23 } | 23 } |
| 24 } | 24 } |
| 25 | 25 |
| 26 main() { | 26 main() { |
| 27 new Derived().f(); | 27 new Derived().f(); |
| 28 p(); /// 02: compile-time error | 28 p(); //# 02: compile-time error |
| 29 } | 29 } |
| OLD | NEW |