Akuli / jou

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

Self in function body error message #363

Closed Akuli closed 1 year ago

Akuli commented 1 year ago
def foo() -> void:
    x = self
    return

Expected result: error saying 'self' cannot be used here

Actual result: compiler error in file "asd.jou", line 2: no variable named 'self'

Even though self can be thought of as just a variable, the error message for using it in the wrong place should be very clear.

Akuli commented 1 year ago

Related: #246