Commit Graph

3 Commits

Author SHA1 Message Date
Holly Borla
8713d78704 [PrintOptions] Print explicit 'any' in SIL. 2022-08-18 01:15:12 -04:00
Slava Pestov
d222ac5f6e Sema: New syntax for @opened archetypes in textual SIL
The old syntax was

    @opened("UUID") constraintType

Where constraintType was the right hand side of a conformance requirement.

This would always create an archetype where the interface type was `Self`,
so it couldn't cope with member types of opened existential types.

Member types of opened existential types is now a thing with SE-0309, so
this lack of support prevented writing SIL test cases using this feature.

The new syntax is

    @opened("UUID", constraintType) interfaceType

The interfaceType is a type parameter rooted in an implicit `Self`
generic parameter, which is understood to be the underlying type of the
existential.

Fixes rdar://problem/93771238.
2022-08-07 19:03:46 -04:00
Anthony Latsis
21500abe25 AST: Never query the map with non-root archetypes in QueryTypeSubstitutionMapOrIdentity
This makes `SILCloner::getASTTypeInClonedContext` and `getTypeInClonedContext`,
which use `QueryTypeSubstitutionMapOrIdentity`, work for nested opened archetypes
and consequently fixes inlining of instructions involving these archetypes.
2022-05-02 14:13:55 +03:00