Skip to content

Commit 305fa94

Browse files
committed
Sema: Use ParamDecl::getInterfaceType() instead of getType() in TypeCheckEffects.cpp
1 parent e8efaaa commit 305fa94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/TypeCheckEffects.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class AbstractFunction {
283283
return AFD->getInterfaceType();
284284
}
285285
case Kind::Closure: return getClosure()->getType();
286-
case Kind::Parameter: return getParameter()->getType();
286+
case Kind::Parameter: return getParameter()->getInterfaceType();
287287
}
288288
llvm_unreachable("bad kind");
289289
}
@@ -846,7 +846,7 @@ class ApplyClassifier {
846846
Classification classifyParameterBody(ParamDecl *param,
847847
PotentialEffectReason reason,
848848
EffectKind kind) {
849-
assert(param->getType()
849+
assert(param->getInterfaceType()
850850
->lookThroughAllOptionalTypes()
851851
->castTo<AnyFunctionType>()
852852
->hasEffect(kind));

0 commit comments

Comments
 (0)