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: frog/tests/leg_only/src/StaticMethod2Test.dart

Issue 8949039: Make sure a class is resolved before looking up its elements. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 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 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 void expectEquals(var expected, var actual) { 5 void expectEquals(var expected, var actual) {
6 if (expected == actual) { 6 if (expected == actual) {
7 } else { 7 } else {
8 print("Actual does not match expected"); 8 print("Actual does not match expected");
9 throw actual; 9 throw actual;
10 } 10 }
11 } 11 }
12 12
13 class A { 13 class A {
14 static foo(res) { 14 static foo(res) {
15 return res; 15 return res;
16 } 16 }
17
18 bar(res) {
19 return foo(res);
20 }
21
22 bar2(res) {
23 return A.foo(res);
24 }
25 } 17 }
26 18
27 main() { 19 main() {
28 A a = new A(); 20 expectEquals(42, A.foo(42));
29 expectEquals(42, a.bar(42));
30 expectEquals(43, a.bar2(43));
31 } 21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698