Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1263)

Side by Side Diff: tests/language/prefix_unqualified_invocation_test.dart

Issue 2765693002: Update all tests (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698