File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2700,13 +2700,16 @@ Type TypeResolver::resolveASTFunctionType(
2700
2700
}
2701
2701
2702
2702
auto fnTy = FunctionType::get (params, outputTy, extInfo);
2703
+
2704
+ if (fnTy->hasError ())
2705
+ return fnTy;
2706
+
2703
2707
// If the type is a block or C function pointer, it must be representable in
2704
2708
// ObjC.
2705
2709
switch (representation) {
2706
2710
case AnyFunctionType::Representation::Block:
2707
2711
case AnyFunctionType::Representation::CFunctionPointer:
2708
- if (!fnTy->hasError () &&
2709
- !fnTy->isRepresentableIn (ForeignLanguage::ObjectiveC, DC)) {
2712
+ if (!fnTy->isRepresentableIn (ForeignLanguage::ObjectiveC, DC)) {
2710
2713
StringRef strName =
2711
2714
(representation == AnyFunctionType::Representation::Block)
2712
2715
? " block"
You can’t perform that action at this time.
0 commit comments