File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed
Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -9179,8 +9179,8 @@ ConstraintSystem::simplifyOptionalObjectConstraint(
91799179 }
91809180
91819181 if (optTy->isPlaceholder()) {
9182- // object type should be simplified because it could be already bound.
9183- recordAnyTypeVarAsPotentialHole(simplifyType(second) );
9182+ if (auto *typeVar = second->getAs<TypeVariableType>())
9183+ recordPotentialHole(typeVar );
91849184 return SolutionKind::Solved;
91859185 }
91869186
Original file line number Diff line number Diff line change @@ -150,25 +150,3 @@ func fallthrough_not_last(i: Int) {
150150 break
151151 }
152152}
153-
154- // rdar://117871338 - incorrect diagnostic - type of expression is ambiguous when member is missing.
155- func test_invalid_optional_chaining( ) {
156- func test( _: ( E ) -> Void ) {
157- }
158-
159- enum E {
160- case a
161- case b
162- }
163-
164- struct S {
165- var prop : E
166- }
167-
168- test {
169- switch $0. prop? { // expected-error {{value of type 'E' has no member 'prop'}}
170- case . a: break
171- case . b: break
172- }
173- }
174- }
You can’t perform that action at this time.
0 commit comments