Open
Description
openedon Mar 15, 2021
Issue To Be Solved
We currently determine if a failable cast can succeed (in sema.FailableCastCanSucceed
), and report an error it can never succeed.
Extend this check to also handle primitive types, e.g. the following examples should be static errors:
let s = ""
let i = s as! Int
struct S {}
let s = S()
let i = s as! Int
Suggested Solution
- Extend
sema.FailableCastCanSucceed
- Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment