We really should be checking for the presence of the ownership
annotation from the top of the parameter's TypeRepr hierarchy, instead
of the bottom.
This fixes some missed edge cases that are now relevant, like
`some ~Copyable`. parameters
Subscripts today don't support any form of ownership specifier
for its parameters Since noncopyable types require such a
specifier, it's not helpful to emit an error suggesting to add
the specifier.
rdar://109233314
These are the same semantically, just the mangling is slightly different. The
benefit of doing this is that we are actually testing what we expect our users
to do.
rdar://108511703
the main things still left behind the experimental flag(s) are
- move-only classes (guarded by MoveOnlyClasses feature)
- noimplicitcopy
- the _borrow operator
Per the current proposal, these are to be specified
explicitly, as they form an important part of the API.
Bonus: This commit includes a fix to make
`CompileTimeConstTypeRepr` a proper `isa<>` subtype of
`SpecifierTypeRepr`, since we forgot to add it to
that type's `classof` function.
resolves rdar://105480354