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

Side by Side Diff: test/codegen/fieldtest.dart

Issue 1137543005: Type check binary expressions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase and remove assert Created 5 years, 7 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
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library fieldtest; 5 library fieldtest;
6 6
7 class A { 7 class A {
8 int x = 42; 8 int x = 42;
9 } 9 }
10 10
(...skipping 28 matching lines...) Expand all
39 abstract class BaseWithGetter { 39 abstract class BaseWithGetter {
40 int get foo => 1; 40 int get foo => 1;
41 int get bar; 41 int get bar;
42 } 42 }
43 class Derived extends BaseWithGetter { 43 class Derived extends BaseWithGetter {
44 int foo = 2; 44 int foo = 2;
45 int bar = 3; 45 int bar = 3;
46 } 46 }
47 47
48 class Generic<T> { 48 class Generic<T> {
49 foo(T t) => print(bar + t); 49 foo(T t) => print(bar + (t as String));
50 50
51 static String bar = 'hello'; 51 static String bar = 'hello';
52 } 52 }
53 53
54 void main() { 54 void main() {
55 var a = new A(); 55 var a = new A();
56 foo(a); 56 foo(a);
57 bar(a); 57 bar(a);
58 print(baz(a)); 58 print(baz(a));
59 59
60 print(new Generic<String>().foo(' world')); 60 print(new Generic<String>().foo(' world'));
61 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698