File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -2241,10 +2241,16 @@ FunctionType::ExtInfo ConstraintSystem::closureEffects(ClosureExpr *expr) {
22412241 // of is-patterns applied to an irrefutable pattern.
22422242 pattern = pattern->getSemanticsProvidingPattern ();
22432243 while (auto isp = dyn_cast<IsPattern>(pattern)) {
2244- const Type castType = TypeResolution::forContextual (
2245- CS.DC , TypeResolverContext::InExpression,
2246- /* unboundTyOpener*/ nullptr )
2247- .resolveType (isp->getCastTypeRepr ());
2244+ Type castType;
2245+ if (auto castTypeRepr = isp->getCastTypeRepr ()) {
2246+ castType = TypeResolution::forContextual (
2247+ CS.DC , TypeResolverContext::InExpression,
2248+ /* unboundTyOpener*/ nullptr )
2249+ .resolveType (castTypeRepr);
2250+ } else {
2251+ castType = isp->getCastType ();
2252+ }
2253+
22482254 if (castType->hasError ()) {
22492255 return false ;
22502256 }
Original file line number Diff line number Diff line change 22
33// Redeclaration checking
44func redecl1( ) async { } // expected-note{{previously declared here}}
5- func redecl1( ) throws { } // expected-error{{invalid redeclaration of 'redecl1()'}}
5+ func redecl1( ) async throws { } // expected-error{{invalid redeclaration of 'redecl1()'}}
66
77// Override checking
88
You can’t perform that action at this time.
0 commit comments