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

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 1413743003: Remove MissingTypeError to remove duplicate warnings (issue 24610) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index d1ebb6b1718b045a720a634e9edfa557c143975f..9cfefe83a9e8890ab90e5071ffb2652c64712c11 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -563,9 +563,7 @@ class CodeChecker extends RecursiveAstVisitor {
@override
void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
var element = node.staticElement;
- if (element == null) {
- _recordMessage(new MissingTypeError(node));
- } else {
+ if (element != null) {
var type = node.staticElement.type;
checkArgumentList(node.argumentList, type);
}
@@ -663,8 +661,6 @@ class CodeChecker extends RecursiveAstVisitor {
if (element != null) {
var type = rules.elementType(node.staticElement);
checkArgumentList(arguments, type);
- } else {
- _recordMessage(new MissingTypeError(node));
}
node.visitChildren(this);
}
@@ -920,11 +916,7 @@ class CodeChecker extends RecursiveAstVisitor {
}
DartType _getStaticType(Expression expr) {
- var type = expr.staticType;
- if (type == null) {
- reporter.onError(new MissingTypeError(expr).toAnalysisError());
- }
- return type ?? rules.provider.dynamicType;
+ return expr.staticType ?? rules.provider.dynamicType;
Leaf 2015/10/16 22:21:12 Is it a problem that we're using null aware operat
Brian Wilkerson 2015/10/17 14:53:13 We updated the SDK dependencies Friday, so it shou
}
void _recordDynamicInvoke(AstNode node, AstNode target) {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698