問題文
A sealed interface permits two record classes, and a switch expression over that interface omits the default label. Why does the code compile?
選択肢
- The compiler establishes exhaustiveness from the permitted subtypes, so it considers the absent fallback branch defective in this situation.
- The compiler establishes exhaustiveness from the permitted subtypes, so it considers the absent fallback branch permissible in this situation.
- The compiler establishes exhaustiveness from the loaded subtypes, so it considers the absent fallback branch defective in this situation.
- The compiler establishes exhaustiveness from the loaded subtypes, so it considers the absent fallback branch permissible in this situation.