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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2825813002: Issue 29358. Fix for reporting constant errors while evaluating constructor invocations. (Closed)
Patch Set: Restore TODO. Created 3 years, 8 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
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 analyzer.src.generated.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION) || 1692 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION) ||
1693 identical( 1693 identical(
1694 dataErrorCode, CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE) || 1694 dataErrorCode, CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE) ||
1695 identical(dataErrorCode, 1695 identical(dataErrorCode,
1696 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING) || 1696 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING) ||
1697 identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL) || 1697 identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL) ||
1698 identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_INT) || 1698 identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_INT) ||
1699 identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM) || 1699 identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM) ||
1700 identical(dataErrorCode, 1700 identical(dataErrorCode,
1701 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT) || 1701 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT) ||
1702 identical(dataErrorCode,
1703 CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION) ||
1702 identical( 1704 identical(
1703 dataErrorCode, 1705 dataErrorCode,
1704 CheckedModeCompileTimeErrorCode 1706 CheckedModeCompileTimeErrorCode
1705 .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH) || 1707 .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH) ||
1706 identical( 1708 identical(
1707 dataErrorCode, 1709 dataErrorCode,
1708 CheckedModeCompileTimeErrorCode 1710 CheckedModeCompileTimeErrorCode
1709 .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH) || 1711 .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH) ||
1710 identical(dataErrorCode, 1712 identical(dataErrorCode,
1711 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH)) { 1713 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH)) {
(...skipping 9219 matching lines...) Expand 10 before | Expand all | Expand 10 after
10931 return null; 10933 return null;
10932 } 10934 }
10933 if (identical(node.staticElement, variable)) { 10935 if (identical(node.staticElement, variable)) {
10934 if (node.inSetterContext()) { 10936 if (node.inSetterContext()) {
10935 result = true; 10937 result = true;
10936 } 10938 }
10937 } 10939 }
10938 return null; 10940 return null;
10939 } 10941 }
10940 } 10942 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/error/codes.dart ('k') | pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698