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

Side by Side Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 1577143002: associate a staticInvokeType with loadLibrary (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | 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) 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 // TODO(jmesserly): this file needs to be refactored, it's a port from 5 // TODO(jmesserly): this file needs to be refactored, it's a port from
6 // package:dev_compiler's tests 6 // package:dev_compiler's tests
7 /// General type checking tests 7 /// General type checking tests
8 library analyzer.test.src.task.strong.checker_test; 8 library analyzer.test.src.task.strong.checker_test;
9 9
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 } 1618 }
1619 } 1619 }
1620 bar() { 1620 bar() {
1621 for (var i = 0; i < 10; i++) { 1621 for (var i = 0; i < 10; i++) {
1622 int j = i + 1; 1622 int j = i + 1;
1623 } 1623 }
1624 } 1624 }
1625 ''' 1625 '''
1626 }); 1626 });
1627 1627
1628 testChecker('loadLibrary', {
1629 '/lib1.dart': '''library lib1;''',
1630 '/main.dart': r'''
1631 import 'lib1.dart' deferred as lib1;
1632 main() {
1633 Future f = lib1.loadLibrary();
1634 }'''
1635 });
1636
1628 group('invalid overrides', () { 1637 group('invalid overrides', () {
1629 testChecker('child override', { 1638 testChecker('child override', {
1630 '/main.dart': ''' 1639 '/main.dart': '''
1631 class A {} 1640 class A {}
1632 class B {} 1641 class B {}
1633 1642
1634 class Base { 1643 class Base {
1635 A f; 1644 A f;
1636 } 1645 }
1637 1646
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2467 2476
2468 baz1() sync* { yield* (/*info:DYNAMIC_CAST*/x); } 2477 baz1() sync* { yield* (/*info:DYNAMIC_CAST*/x); }
2469 Iterable baz2() sync* { yield* (/*info:DYNAMIC_CAST*/x); } 2478 Iterable baz2() sync* { yield* (/*info:DYNAMIC_CAST*/x); }
2470 Iterable<int> baz3() sync* { yield* (/*warning:DOWN_CAST_COMPOSITE*/x); } 2479 Iterable<int> baz3() sync* { yield* (/*warning:DOWN_CAST_COMPOSITE*/x); }
2471 Iterable<int> baz4() sync* { yield* new Iterable<int>(); } 2480 Iterable<int> baz4() sync* { yield* new Iterable<int>(); }
2472 Iterable<int> baz5() sync* { yield* (/*info:INFERRED_TYPE_ALLOCATION*/ne w Iterable()); } 2481 Iterable<int> baz5() sync* { yield* (/*info:INFERRED_TYPE_ALLOCATION*/ne w Iterable()); }
2473 ''' 2482 '''
2474 }); 2483 });
2475 }); 2484 });
2476 } 2485 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698