MontysCoconut / moco

The Monty to LLVM compiler
http://www.informatik.uni-bremen.de/monty/
GNU General Public License v3.0
10 stars 5 forks source link

Fix upcast with 'as' operator #2

Closed lummax closed 9 years ago

lummax commented 9 years ago

Imagine: instance as SomeClass

The check in TypeCheckVisitor would only check if SomeClass inherits the class of instance but not the other way arround. This MR fixes the issue and adds test-cases.