AZHenley / knox

A toy programming language written in Go that compiles to C.
MIT License
96 stars 7 forks source link

Members references without Self cause C errors #162

Open AZHenley opened 5 years ago

AZHenley commented 5 years ago

class foo {
    var num : int = 0;
    func test1() int {
        return num; // C error! num is not in scope.
    }
    func test2() int {
        return self.num; // OK!
    }
}```