encore icon indicating copy to clipboard operation
encore copied to clipboard

Using null gives compile error with no line number

Open helanhalvan opened this issue 7 years ago • 0 comments

I am well aware that null is on it's way out of the language, so it can not be used now. This code:

class Main
   def main(args:[String]) : unit
        if args(3) == null then
            print("derp")
        end
   end
end

Gives the error encorec: I don't know how to translate null type to pony.c. Also getting a file name, line number and/or the code that caused the problem would also be helpful.

There is also the delicious issue that checking for null is not illegal, so instead of having and being able to check for null, current encore have and can not check for null. But it's not like anyone will care about that.

helanhalvan avatar Mar 16 '17 14:03 helanhalvan