ooc-lang / rock

:ocean: self-hosted ooc compiler that generates c99
http://ooc-lang.org/
MIT License
403 stars 40 forks source link

Ternary operator should take the common root of the left and right expr types instead of equality checking them #939

Open alexnask opened 8 years ago

alexnask commented 8 years ago

Right now, what it does is check the two types for equality and in the case they aren't, check if they are both pointer-like types.

Instead, it should take the common root and if null, then go ahead and check for pointer-like-ability (which may already be included in findCommonRoot)