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

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2735033002: Fix for 'const C.named()' type inference when 'C' is resolved and has type parameters, but 'named' … (Closed)
Patch Set: Created 3 years, 9 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/src/summary/resynthesize_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index d67a8e5c69d414c372e25656fe538c41e38b303c..a43bc65dd11b97f840e38139a04eea73c4794aab 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -2381,7 +2381,14 @@ class ExprTypeComputer {
} else {
ClassElementForLink classElement =
unit.resolveConstructorClassRef(ref.reference).asClass;
- stack.add(classElement?.type ?? DynamicTypeImpl.instance);
+ DartType inferredType;
+ if (classElement != null) {
+ InterfaceType rawType = classElement.type;
+ inferredType = linker.typeSystem.instantiateToBounds(rawType);
+ } else {
+ inferredType = DynamicTypeImpl.instance;
+ }
+ stack.add(inferredType);
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698