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

Side by Side Diff: pkg/analyzer/test/generated/non_error_resolver_test.dart

Issue 738863005: Respect order dependencies in ImplicitConstructorBuilder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sort unit/class members. Created 6 years 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
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 engine.non_error_resolver_test; 5 library engine.non_error_resolver_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 class A implements Function { 1394 class A implements Function {
1395 noSuchMethod(inv) { 1395 noSuchMethod(inv) {
1396 return 42; 1396 return 42;
1397 } 1397 }
1398 }'''); 1398 }''');
1399 resolve(source); 1399 resolve(source);
1400 assertNoErrors(source); 1400 assertNoErrors(source);
1401 verify([source]); 1401 verify([source]);
1402 } 1402 }
1403 1403
1404 void test_implicitConstructorDependencies() {
1405 // No warning should be generated for the code below; this requires that
1406 // implicit constructors are generated for C1 before C2, even though C1
1407 // follows C2 in the file. See dartbug.com/21600.
1408 Source source = addSource(r'''
1409 class B {
1410 B(int i);
1411 }
1412 class M1 {}
1413 class M2 {}
1414
1415 class C2 = C1 with M2;
1416 class C1 = B with M1;
1417
1418 main() {
1419 new C2(5);
1420 }
1421 ''');
1422 resolve(source);
1423 assertNoErrors(source);
1424 verify([source]);
1425 }
1426
1404 void test_implicitThisReferenceInInitializer_constructorName() { 1427 void test_implicitThisReferenceInInitializer_constructorName() {
1405 Source source = addSource(r''' 1428 Source source = addSource(r'''
1406 class A { 1429 class A {
1407 A.named() {} 1430 A.named() {}
1408 } 1431 }
1409 class B { 1432 class B {
1410 var v; 1433 var v;
1411 B() : v = new A.named(); 1434 B() : v = new A.named();
1412 }'''); 1435 }''');
1413 resolve(source); 1436 resolve(source);
(...skipping 3379 matching lines...) Expand 10 before | Expand all | Expand 10 after
4793 resolve(source); 4816 resolve(source);
4794 assertNoErrors(source); 4817 assertNoErrors(source);
4795 verify([source]); 4818 verify([source]);
4796 reset(); 4819 reset();
4797 } 4820 }
4798 4821
4799 void _check_wrongNumberOfParametersForOperator1(String name) { 4822 void _check_wrongNumberOfParametersForOperator1(String name) {
4800 _check_wrongNumberOfParametersForOperator(name, "a"); 4823 _check_wrongNumberOfParametersForOperator(name, "a");
4801 } 4824 }
4802 } 4825 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698