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

Unified Diff: pkg/analyzer/lib/src/dart/element/type.dart

Issue 1801903002: Guard against parameters with no types (issue 25692) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/type.dart
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 2d03cccbafe9901d83201db4f6bb52e5ba5b902b..aedd7b2ac723a2194ab07f30b3eece2a8ff05fdf 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -739,7 +739,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
TypeParameterTypeImpl.getTypes(this.typeParameters);
for (ParameterElement parameter in baseParameters) {
if (parameter.parameterKind == kind) {
- TypeImpl type = parameter.type;
+ TypeImpl type = parameter.type ?? DynamicTypeImpl.instance;
if (typeArguments.length != 0 &&
typeArguments.length == typeParameters.length) {
type = type.substitute2(typeArguments, typeParameters, newPrune);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698