Hmm this seems to have been introduce by the TypeSystem refactoring.
As long as a left-hand or right-hand expression is an interface (not final) then anything goes
Two testcases using this have been added later:
tests/testcases/integration/operators/cast-6.boo
tests/testcases/integration/types/interfaces-20.boo
Is it intentional? am not sure to get what's the rationale/usecase about it?
Considering the dangers of such a kind of downcasting (I only detected this quite late at run-time because of a typo..) should we allow it only when an explicit cast to interface is present maybe?
Hmm this seems to have been introduce by the TypeSystem refactoring.
As long as a left-hand or right-hand expression is an interface (not final) then anything goes
Two testcases using this have been added later:
tests/testcases/integration/operators/cast-6.boo
tests/testcases/integration/types/interfaces-20.boo
Is it intentional? am not sure to get what's the rationale/usecase about it?
Considering the dangers of such a kind of downcasting (I only detected this quite late at run-time because of a typo..) should we allow it only when an explicit cast to interface is present maybe?