| OLD | NEW |
| 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.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import "dart:math" as math; | 7 import "dart:math" as math; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'ast.dart'; | 10 import 'ast.dart'; |
| (...skipping 14849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14860 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, | 14860 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, |
| 14861 typeName, | 14861 typeName, |
| 14862 [typeName.name]); | 14862 [typeName.name]); |
| 14863 } else if (_isTypeNameInAsExpression(node)) { | 14863 } else if (_isTypeNameInAsExpression(node)) { |
| 14864 reportErrorForNode( | 14864 reportErrorForNode( |
| 14865 StaticWarningCode.CAST_TO_NON_TYPE, | 14865 StaticWarningCode.CAST_TO_NON_TYPE, |
| 14866 typeName, | 14866 typeName, |
| 14867 [typeName.name]); | 14867 [typeName.name]); |
| 14868 } else if (_isTypeNameInIsExpression(node)) { | 14868 } else if (_isTypeNameInIsExpression(node)) { |
| 14869 reportErrorForNode( | 14869 reportErrorForNode( |
| 14870 StaticWarningCode.TYPE_TEST_NON_TYPE, | 14870 StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME, |
| 14871 typeName, | 14871 typeName, |
| 14872 [typeName.name]); | 14872 [typeName.name]); |
| 14873 } else if ((redirectingConstructorKind = | 14873 } else if ((redirectingConstructorKind = |
| 14874 _getRedirectingConstructorKind(node)) != null) { | 14874 _getRedirectingConstructorKind(node)) != null) { |
| 14875 ErrorCode errorCode = | 14875 ErrorCode errorCode = |
| 14876 (redirectingConstructorKind == RedirectingConstructorKind.CONST ? | 14876 (redirectingConstructorKind == RedirectingConstructorKind.CONST ? |
| 14877 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS : | 14877 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS : |
| 14878 StaticWarningCode.REDIRECT_TO_NON_CLASS); | 14878 StaticWarningCode.REDIRECT_TO_NON_CLASS); |
| 14879 reportErrorForNode(errorCode, typeName, [typeName.name]); | 14879 reportErrorForNode(errorCode, typeName, [typeName.name]); |
| 14880 } else if (_isTypeNameInTypeArgumentList(node)) { | 14880 } else if (_isTypeNameInTypeArgumentList(node)) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14930 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, | 14930 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, |
| 14931 typeName, | 14931 typeName, |
| 14932 [typeName.name]); | 14932 [typeName.name]); |
| 14933 } else if (_isTypeNameInAsExpression(node)) { | 14933 } else if (_isTypeNameInAsExpression(node)) { |
| 14934 reportErrorForNode( | 14934 reportErrorForNode( |
| 14935 StaticWarningCode.CAST_TO_NON_TYPE, | 14935 StaticWarningCode.CAST_TO_NON_TYPE, |
| 14936 typeName, | 14936 typeName, |
| 14937 [typeName.name]); | 14937 [typeName.name]); |
| 14938 } else if (_isTypeNameInIsExpression(node)) { | 14938 } else if (_isTypeNameInIsExpression(node)) { |
| 14939 reportErrorForNode( | 14939 reportErrorForNode( |
| 14940 StaticWarningCode.TYPE_TEST_NON_TYPE, | 14940 StaticWarningCode.TYPE_TEST_WITH_NON_TYPE, |
| 14941 typeName, | 14941 typeName, |
| 14942 [typeName.name]); | 14942 [typeName.name]); |
| 14943 } else if ((redirectingConstructorKind = | 14943 } else if ((redirectingConstructorKind = |
| 14944 _getRedirectingConstructorKind(node)) != null) { | 14944 _getRedirectingConstructorKind(node)) != null) { |
| 14945 ErrorCode errorCode = | 14945 ErrorCode errorCode = |
| 14946 (redirectingConstructorKind == RedirectingConstructorKind.CONST ? | 14946 (redirectingConstructorKind == RedirectingConstructorKind.CONST ? |
| 14947 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS : | 14947 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS : |
| 14948 StaticWarningCode.REDIRECT_TO_NON_CLASS); | 14948 StaticWarningCode.REDIRECT_TO_NON_CLASS); |
| 14949 reportErrorForNode(errorCode, typeName, [typeName.name]); | 14949 reportErrorForNode(errorCode, typeName, [typeName.name]); |
| 14950 } else if (_isTypeNameInTypeArgumentList(node)) { | 14950 } else if (_isTypeNameInTypeArgumentList(node)) { |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16264 * library. | 16264 * library. |
| 16265 */ | 16265 */ |
| 16266 final HashSet<String> members = new HashSet<String>(); | 16266 final HashSet<String> members = new HashSet<String>(); |
| 16267 | 16267 |
| 16268 /** | 16268 /** |
| 16269 * Names of resolved or unresolved class members that are read in the | 16269 * Names of resolved or unresolved class members that are read in the |
| 16270 * library. | 16270 * library. |
| 16271 */ | 16271 */ |
| 16272 final HashSet<String> readMembers = new HashSet<String>(); | 16272 final HashSet<String> readMembers = new HashSet<String>(); |
| 16273 } | 16273 } |
| OLD | NEW |