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

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

Issue 10735051: Fix usage of UNKNOWN/CONFLICTING types for union. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cosmetic change in comment. Created 8 years, 5 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Dart test program to test type-based optimization on fields.
6
7
8 class A {
9 var x;
10 A() : x = 0;
11 foo() {
12 x++;
13 }
14 toto() {
15 x = 99;
16 }
17 bar(y) {
18 x = y;
19 }
20 }
21
22 class B {
23 operator +(other) => "ok";
24 }
25 main() {
26 var a = new A();
27 a.foo();
28 a.toto();
29 a.bar("str");
30 a.bar(new B());
31 a.foo();
32 Expect.equals("ok", a.x);
33 }
OLDNEW
« lib/compiler/implementation/ssa/types.dart ('K') | « tests/language/field_optimization2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698