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

Side by Side Diff: compiler/javatests/com/google/dart/compiler/end2end/inc/my.no5ref.dart

Issue 8948001: Updates dartc to recognize 'default' keyword on interface and updated factory method syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from mmendez 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 class Spoo<T> { 5 class Spoo<T> {
6 Spoo() { } 6 Spoo() { }
7 Spoo.other() { } 7 Spoo.other() { }
8 } 8 }
9 9
10 main() { 10 main() {
11 // Static method reference to Other0. 11 // Static method reference to Other0.
12 var v = Other0.value(); 12 var v = Other0.value();
13 13
14 // Reference Other1 via new. 14 // Reference Other1 via new.
15 var o1 = new Other1(); 15 var o1 = new Other1();
16 16
17 // Static field reference to Other3. 17 // Static field reference to Other3.
18 var f = Other3.field; 18 var f = Other3.field;
19 19
20 // Reference SomeClass via new, and SomeClassImpl transitively. 20 // Reference SomeClass via new, and SomeClassImpl transitively.
21 var sc = new SomeClass(); 21 var sc = new SomeClass(1);
22 var msg = sc.message; 22 var msg = sc.message;
23 } 23 }
24 24
25 class Qualifiers extends QualifierBase { 25 class Qualifiers extends QualifierBase {
26 void fn() { 26 void fn() {
27 // Qualified reference to Other6's method. 27 // Qualified reference to Other6's method.
28 var result = other6.method(); 28 var result = other6.method();
29 } 29 }
30 } 30 }
31 31
32 // Reference Other2 by subclassing it. 32 // Reference Other2 by subclassing it.
33 class Foo extends Other2 { 33 class Foo extends Other2 {
34 foo() { 34 foo() {
35 // unqualified reference to superclass method. 35 // unqualified reference to superclass method.
36 methodHole(); 36 methodHole();
37 37
38 // unqualified reference to superclass field. 38 // unqualified reference to superclass field.
39 return hole; 39 return hole;
40 } 40 }
41 41
42 int bar() { 42 int bar() {
43 // qualified reference 43 // qualified reference
44 return super.not_hole.contents; 44 return super.not_hole.contents;
45 } 45 }
46 } 46 }
47 47
48 // Reference Other4 using it as a type parameter bound. 48 // Reference Other4 using it as a type parameter bound.
49 class Bar<T extends Other4> { 49 class Bar<T extends Other4> {
50 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698