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

Side by Side Diff: pkg/kernel/testcases/input/micro.dart

Issue 2825063002: Move kernel baseline tests to front_end. (Closed)
Patch Set: Created 3 years, 8 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
(Empty)
1 staticMethod() {
2 return "sdfg";
3 }
4
5 class Foo {
6 instanceMethod() {
7 return 123;
8 }
9 }
10
11 external bool externalStatic();
12
13 abstract class ExternalValue {}
14
15 abstract class Bar {
16 ExternalValue externalInstanceMethod();
17 }
18
19 external Bar createBar();
20
21 class Box {
22 var field;
23 }
24
25 stringArgument(x) {}
26
27 intArgument(x) {}
28
29 class FinalBox {
30 final finalField;
31 FinalBox(this.finalField);
32 }
33
34 class SubFinalBox extends FinalBox {
35 SubFinalBox(value) : super(value);
36 }
37
38 class DynamicReceiver1 {
39 dynamicallyCalled(x) {}
40 }
41
42 class DynamicReceiver2 {
43 dynamicallyCalled(x) {}
44 }
45
46 void makeDynamicCall(receiver) {
47 receiver.dynamicallyCalled("sdfg");
48 }
49
50 main() {
51 var x = staticMethod();
52 var y = new Foo().instanceMethod();
53 var z = externalStatic();
54 var w = createBar().externalInstanceMethod();
55
56 stringArgument("sdfg");
57 intArgument(42);
58
59 var box = new Box();
60 box.field = "sdfg";
61 var a = box.field;
62
63 var finalBox = new FinalBox("dfg");
64 var b = finalBox.finalField;
65
66 var subBox = new SubFinalBox("dfg");
67 var c = subBox.finalField;
68
69 makeDynamicCall(new DynamicReceiver1());
70 makeDynamicCall(new DynamicReceiver2());
71
72 var list = ["string"];
73 var d = list[0];
74 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/input/fallthrough.dart ('k') | pkg/kernel/testcases/input/named_parameters.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698