<@U0F8Y5E5A> Surprisingly, the compiler is not fla...
# random
c
@mg6maciej Surprisingly, the compiler is not flagging this as “will always be `false`”
m
You never know. There might be an alternative universe where this is actually always true.
b
The universe where all languages are untyped. Not the most efficient of the universes...
m
x is Class1 && x is Class2
should be an error.
m
Not when
open class Class2 && class Class1 : Class2
😉
Could be a warning tho.
c
@miha-x64 Why would it be an error?
Copy code
interface A {}
    interface B {}
    class Z : A,B

    val a: Z? = null
    val b = a is A && a is B
m
@miha-x64 specifically mentioned 2 classes.
For interfaces it's cool. Kinda quasimodo-union types.