OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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("../../../leg/leg.dart"); | 5 #import("../../../../lib/compiler/implementation/leg.dart"); |
6 #import("../../../leg/elements/elements.dart"); | 6 #import("../../../../lib/compiler/implementation/elements/elements.dart"); |
7 #import("../../../leg/tree/tree.dart"); | 7 #import("../../../../lib/compiler/implementation/tree/tree.dart"); |
8 #import('../../../leg/scanner/scannerlib.dart'); | 8 #import('../../../../lib/compiler/implementation/scanner/scannerlib.dart'); |
9 #import("../../../leg/util/util.dart"); | 9 #import("../../../../lib/compiler/implementation/util/util.dart"); |
10 #import("mock_compiler.dart"); | 10 #import("mock_compiler.dart"); |
11 #import("parser_helper.dart"); | 11 #import("parser_helper.dart"); |
12 | 12 |
13 Type intType; | 13 Type intType; |
14 Type boolType; | 14 Type boolType; |
15 Type stringType; | 15 Type stringType; |
16 Type doubleType; | 16 Type doubleType; |
17 Type objectType; | 17 Type objectType; |
18 | 18 |
19 main() { | 19 main() { |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 parser.parseStatement(tokens); | 423 parser.parseStatement(tokens); |
424 Node node = listener.popNode(); | 424 Node node = listener.popNode(); |
425 TreeElements elements = compiler.resolveNodeStatement(node, classElement); | 425 TreeElements elements = compiler.resolveNodeStatement(node, classElement); |
426 TypeCheckerVisitor checker = new TypeCheckerVisitor(compiler, elements, | 426 TypeCheckerVisitor checker = new TypeCheckerVisitor(compiler, elements, |
427 types); | 427 types); |
428 compiler.clearWarnings(); | 428 compiler.clearWarnings(); |
429 checker.currentClass = classElement; | 429 checker.currentClass = classElement; |
430 checker.analyze(node); | 430 checker.analyze(node); |
431 compareWarningKinds(text, expectedWarnings, compiler.warnings); | 431 compareWarningKinds(text, expectedWarnings, compiler.warnings); |
432 } | 432 } |
OLD | NEW |