Commit Graph

3 Commits

Author SHA1 Message Date
Pavel Yaskevich
58988a09da [AST] Prevent use of @extensible without ExtensibleAttribute feature
(cherry picked from commit 0ad7d8b590)
2025-08-18 23:57:45 -07:00
Pavel Yaskevich
bcf38a1aef [AST/Sema] Add @extensible attribute on enum declarations
This attribute controls whether cross-module access to the declaration
needs `@unknown default:` because it's allowed to gain new cases even
if the module is non-resilient.

(cherry picked from commit a0ae93d3a8)
2025-08-18 23:56:49 -07:00
Pavel Yaskevich
b84bf055f0 [TypeChecker] Implement ExtensibleEnums feature exhaustivily handling
If an enum comes from a different module that has `ExtensibleEnums`
feature enabled, unless it requires either `@unknown default:` or
`@frozen` because it is allowed to introduce new cases in the future
versions of the module.
2025-02-25 00:05:23 -08:00