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

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

Issue 1081233002: Issue 23190. Type check with a function type alias is its usage. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index d9cc380a9492ddd227d1dfcb808c1c684eea0a82..ad791347e13ef18510f3c6d09f0aece4314a823f 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -4566,14 +4566,14 @@ class GatherUsedLocalElementsVisitor extends RecursiveAstVisitor {
}
// ignore places where the element is not actually used
if (node.parent is TypeName) {
- AstNode parent2 = node.parent.parent;
- if (parent2 is IsExpression) {
- return;
- }
- // We need to instantiate/extend/implement a class to actually use it.
- // OTOH, function type aliases are used to define closure structures.
- if (parent2 is VariableDeclarationList && element is ClassElement) {
- return;
+ if (element is ClassElement) {
+ AstNode parent2 = node.parent.parent;
+ if (parent2 is IsExpression) {
+ return;
+ }
+ if (parent2 is VariableDeclarationList) {
+ return;
+ }
}
}
// OK
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698