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

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

Issue 10908236: Convert static error to warning for calls to toplevel methods, getters and setters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 // When attempting to call a nonexistent static method, getter or setter, check 5 // When attempting to call a nonexistent static method, getter or setter, check
6 // that a NoSuchMethodError is thrown. 6 // that a NoSuchMethodError is thrown.
7 7
8 class C {} 8 class C {}
9 9
10 class D {
11 get hest => 1; /// 04: continued
12 set hest(val) {} /// 05: continued
13 }
14
15 get fisk => 2; /// 09: continued
16 set fisk(val) {} /// 10: continued
17
10 main() { 18 main() {
11 Expect.throws(() => C.hest = 1, (e) => e is NoSuchMethodError); /// 01: static type warning 19 Expect.throws(() => C.hest = 1, (e) => e is NoSuchMethodError); /// 01: static type warning
12 Expect.throws(() => C.hest, (e) => e is NoSuchMethodError); /// 02: static type warning 20 Expect.throws(() => C.hest, (e) => e is NoSuchMethodError); /// 02: static type warning
13 Expect.throws(() => C.hest(), (e) => e is NoSuchMethodError); /// 03: static type warning 21 Expect.throws(() => C.hest(), (e) => e is NoSuchMethodError); /// 03: static type warning
22 Expect.throws(() => D.hest = 1, (e) => e is NoSuchMethodError); /// 04: static type warning
ahe 2012/09/13 12:31:14 Line is longer than 80 columns. Which reveals an
karlklose 2012/09/13 13:47:26 I changed the test.
23 Expect.throws(() => D.hest, (e) => e is NoSuchMethodError); /// 05: static type warning
24 Expect.throws(() => fisk = 1, (e) => e is NoSuchMethodError); /// 06: static type warning
25 Expect.throws(() => fisk, (e) => e is NoSuchMethodError); /// 07: static type warning
26 Expect.throws(() => fisk(), (e) => e is NoSuchMethodError); /// 08: static type warning
27 Expect.throws(() => fisk = 1, (e) => e is NoSuchMethodError); /// 09: static type warning
28 Expect.throws(() => fisk, (e) => e is NoSuchMethodError); /// 10: static type warning
14 } 29 }
OLDNEW
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698