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

Unified Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 1524893002: Fix imports within the analyzer package (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/element_handle.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/constant.dart
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index f2a8c962e548172dab6a13900c85a36b60ca27d2..006d3a901e2e121d0f794957975e812d04433bfe 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -6,8 +6,11 @@ library analyzer.src.generated.constant;
import 'dart:collection';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/member.dart';
import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/engine.dart'
show AnalysisEngine, RecordingErrorListener;
@@ -714,7 +717,8 @@ class ConstantEvaluationEngine {
DartObjectImpl fieldValue = evaluationResult.value;
if (fieldValue != null && !runtimeTypeMatch(fieldValue, fieldType)) {
errorReporter.reportErrorForNode(
- CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+ CheckedModeCompileTimeErrorCode
+ .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
node,
[fieldValue.type, field.name, fieldType]);
}
@@ -762,7 +766,8 @@ class ConstantEvaluationEngine {
if (argumentValue != null) {
if (!runtimeTypeMatch(argumentValue, parameter.type)) {
errorReporter.reportErrorForNode(
- CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+ CheckedModeCompileTimeErrorCode
+ .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
errorTarget,
[argumentValue.type, parameter.type]);
}
@@ -776,7 +781,8 @@ class ConstantEvaluationEngine {
// the field.
if (!runtimeTypeMatch(argumentValue, fieldType)) {
errorReporter.reportErrorForNode(
- CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+ CheckedModeCompileTimeErrorCode
+ .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
errorTarget,
[argumentValue.type, fieldType]);
}
@@ -818,7 +824,8 @@ class ConstantEvaluationEngine {
PropertyInducingElement field = getter.variable;
if (!runtimeTypeMatch(evaluationResult, field.type)) {
errorReporter.reportErrorForNode(
- CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+ CheckedModeCompileTimeErrorCode
+ .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
node,
[evaluationResult.type, fieldName, field.type]);
}
@@ -992,7 +999,8 @@ class ConstantEvaluationEngine {
* Determine whether the given string is a valid name for a public symbol
* (i.e. whether it is allowed for a call to the Symbol constructor).
*/
- static bool isValidPublicSymbol(String name) => name.isEmpty ||
+ static bool isValidPublicSymbol(String name) =>
+ name.isEmpty ||
name == "void" ||
new JavaPatternMatcher(_PUBLIC_SYMBOL_PATTERN, name).matches();
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/element_handle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698