Commit Graph

3 Commits

Author SHA1 Message Date
Mishal Shah
22f61df98b Use %target-cpu in the tests to support running on Apple Silicon hardware 2021-04-08 23:26:18 -07:00
Slava Pestov
511ada4a50 Sema: Ban potential unavailability on enum cases with associated values
This cannot be supported for the same reasons struct and class stored
properties with potential unavailability cannot be supported.

It is possible that some users relied on this, because it worked in
some cases where the type metadata for the potentially unavailable
type was not actually needed for anything (eg, if the type was @frozen
and trivial, or a simple class reference). If this becomes an issue
we can downgrade this to a warning.

Note that just like the previous fix for stored properties, we do
still allow writing an '@available' attribute on the enum element if
the OS version is not any newer than the deployment target. This allows
annotating APIs with the OS version where they were introduced.
2021-03-05 18:03:05 -05:00
Slava Pestov
cb9c1f93ee Sema: Allow @available on stored properties as long as its as new as the deployment target 2021-03-05 18:03:05 -05:00