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

Side by Side Diff: tests/compiler/dart2js/simple_inferrer_test.dart

Issue 16151005: Fix inferrer test by forcing instantiation of a closure. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import 6 import
7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'
8 show TypeMask; 8 show TypeMask;
9 9
10 import 'compiler_helper.dart'; 10 import 'compiler_helper.dart';
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 returnInt3() => ++new A()[0]; 379 returnInt3() => ++new A()[0];
380 returnInt4() => new A()[0] += 42; 380 returnInt4() => new A()[0] += 42;
381 returnInt5() => ++super.myField; 381 returnInt5() => ++super.myField;
382 returnInt6() => super.myField += 4; 382 returnInt6() => super.myField += 4;
383 returnInt7() => ++super[0]; 383 returnInt7() => ++super[0];
384 returnInt8() => super[0] += 54; 384 returnInt8() => super[0] += 54;
385 returnInt9() => super.myField; 385 returnInt9() => super.myField;
386 } 386 }
387 387
388 main() { 388 main() {
389 // Ensure a function class is being instantiated.
390 () => 42;
389 returnNum1(true); 391 returnNum1(true);
390 returnNum2(true); 392 returnNum2(true);
391 returnInt1(true); 393 returnInt1(true);
392 returnInt2(true); 394 returnInt2(true);
393 returnInt3(true); 395 returnInt3(true);
394 returnInt4(); 396 returnInt4();
395 returnDouble(true); 397 returnDouble(true);
396 returnGiveUp(true); 398 returnGiveUp(true);
397 returnInt5(); 399 returnInt5();
398 returnInt6(); 400 returnInt6();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 checkReturnInClass('B', 'returnInt9', typesInferrer.intType); 554 checkReturnInClass('B', 'returnInt9', typesInferrer.intType);
553 555
554 checkFactoryConstructor(String className) { 556 checkFactoryConstructor(String className) {
555 var cls = findElement(compiler, className); 557 var cls = findElement(compiler, className);
556 var element = cls.localLookup(buildSourceString(className)); 558 var element = cls.localLookup(buildSourceString(className));
557 Expect.equals(new TypeMask.nonNullExact(cls.rawType), 559 Expect.equals(new TypeMask.nonNullExact(cls.rawType),
558 typesInferrer.internal.returnTypeOf[element]); 560 typesInferrer.internal.returnTypeOf[element]);
559 } 561 }
560 checkFactoryConstructor('A'); 562 checkFactoryConstructor('A');
561 } 563 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698