Commit Graph

4 Commits

Author SHA1 Message Date
Slava Pestov
1fa9afc460 Sema: Allow parameterized existential compositions 2025-05-23 14:14:23 -04:00
Anthony Latsis
75953d2b51 OpenedExistentials: Do not attempt to erase existential metatypes with invariant Self
The non-metatype case was never supported. The same should hold for the
existential metatype case, which used to miscompile and now crashes
because the invariant reference is deemed OK but the erasure expectedly
fails to handle it:

```swift
class C<T> {}
protocol P {
  associatedtype A

  func f() -> any P & C<A>
  func fMeta() -> any (P & C<A>).Type
}

do {
  let p: any P
  let _ = p.f() // error
  let _ = p.fMeta() // crash
}
```
2025-01-12 17:47:52 +00:00
Anthony Latsis
eb4d4df67c test: More robust type inference checks for existential member accesses 2024-12-08 21:02:27 +00:00
Anthony Latsis
22a21fa3b9 test: Split up existential_member_accesses_self_assoctype.swift 2024-12-04 15:18:12 +00:00