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

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

Issue 23486007: Change the field and constructor parameter types of NoSuchMethodError to Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 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/corelib/map_from_iterable_test.dart ('k') | no next file » | 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 // When attempting to call a nonexistent static method, getter or setter, check 7 // When attempting to call a nonexistent static method, getter or setter, check
8 // that a NoSuchMethodError is thrown. 8 // that a NoSuchMethodError is thrown.
9 9
10 class C {} 10 class C {}
11 11
12 class D { 12 class D {
13 get hest => 1; /// 04: continued 13 get hest => 1; /// 04: continued
14 set hest(val) {} /// 05: continued 14 set hest(val) {} /// 05: continued
15 } 15 }
16 16
17 get fisk => 2; /// 09: continued 17 get fisk => 2; /// 09: continued
18 set fisk(val) {} /// 10: continued 18 set fisk(val) {} /// 10: continued
19 19
20 expectNsme([void fun()]) { 20 expectNsme([void fun()]) {
21 if (fun != null) { 21 if (fun != null) {
22 Expect.throws(fun, (e) => e is NoSuchMethodError); 22 Expect.throws(fun, (e) => e is NoSuchMethodError);
23 } 23 }
24 } 24 }
25 25
26 alwaysThrows() { 26 alwaysThrows() {
27 throw new NoSuchMethodError(null, 'foo', [], {}); 27 throw new NoSuchMethodError(null, const Symbol('foo'), [], {});
28 } 28 }
29 29
30 test01() { 30 test01() {
31 C.hest = 1; /// 01: static type warning 31 C.hest = 1; /// 01: static type warning
32 } 32 }
33 33
34 test02() { 34 test02() {
35 C.hest; /// 02: static type warning 35 C.hest; /// 02: static type warning
36 } 36 }
37 37
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 expectNsme( 93 expectNsme(
94 test08 /// 08: continued 94 test08 /// 08: continued
95 ); 95 );
96 expectNsme( 96 expectNsme(
97 test09 /// 09: continued 97 test09 /// 09: continued
98 ); 98 );
99 expectNsme( 99 expectNsme(
100 test10 /// 10: continued 100 test10 /// 10: continued
101 ); 101 );
102 } 102 }
OLDNEW
« no previous file with comments | « tests/corelib/map_from_iterable_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698