Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

bad error message for missing parentheses #330

Open Akuli opened 1 year ago

Akuli commented 1 year ago

If I have a method do_expression() and I do:

            target = self->do_expression

I get this error:

compiler error in file "self_hosted/create_llvm_ir.jou", line 146: class AstToIR has no field named 'do_expression'

which is ok, but not as good as it could be. Ideally the error message would say that do_expression() is a method, not a field, and that you need () when calling a method.

Should also check what happens if you try to do this with a function (as opposed to method) e.g. foo = printf