Fix nested closures and related bugs

This commit is contained in:
Nathan Braswell
2015-07-05 02:34:45 -04:00
parent d44ce47d1e
commit cfadf7cebb
13 changed files with 101 additions and 56 deletions

View File

@@ -68,6 +68,10 @@ obj string (Object) {
fun operator==(other: string): bool {
return length() == other.length() && !util::range(length()).any_true(fun(i: int):bool { return data[i] != other[i]; } )
}
fun operator==(other: *char): bool {
var str.construct(other) : string
return *this == str
}
fun operator+(str: *char): string {
var newStr.construct(str):string