File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -10733,8 +10733,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
1073310733 // reason to perform a lookup because it wouldn't return any results.
1073410734 if (shouldAttemptFixes()) {
1073510735 auto markMemberTypeAsPotentialHole = [&](Type memberTy) {
10736- if (auto *typeVar = memberTy->getAs<TypeVariableType>())
10737- recordPotentialHole(typeVar);
10736+ recordAnyTypeVarAsPotentialHole(simplifyType(memberTy));
1073810737 };
1073910738
1074010739 // If this is an unresolved member ref e.g. `.foo` and its contextual base
Original file line number Diff line number Diff line change @@ -816,3 +816,13 @@ func test_mismatch_between_param_and_optional_chain() {
816816 }
817817 }
818818}
819+
820+ // rdar://124549952 - incorrect "type of expression is ambiguous without a type annotation"
821+ do {
822+ func fn( ) -> ( any BinaryInteger ) ? { }
823+
824+ func test( ) {
825+ let _ = fn ( ) ? . op ( ) . value
826+ // expected-error@-1 {{value of type 'any BinaryInteger' has no member 'op'}}
827+ }
828+ }
You can’t perform that action at this time.
0 commit comments