some bug fixes, templated operator method overloading
This commit is contained in:
@@ -46,6 +46,7 @@ fun main():int {
|
||||
println("woo lexing:")
|
||||
range(8).for_each(fun(i: int) { println(lex.next().to_string()); } )
|
||||
/*range(80).for_each(fun(i: int) { println(lex.next().to_string()); } )*/
|
||||
println(a.to_string())
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
1
tests/test_template_operator_overload.expected_results
Normal file
1
tests/test_template_operator_overload.expected_results
Normal file
@@ -0,0 +1 @@
|
||||
works
|
||||
14
tests/test_template_operator_overload.krak
Normal file
14
tests/test_template_operator_overload.krak
Normal file
@@ -0,0 +1,14 @@
|
||||
import io:*
|
||||
|
||||
obj it {
|
||||
fun operator+<U>(other: U): it {
|
||||
println(other)
|
||||
return *this
|
||||
}
|
||||
}
|
||||
|
||||
fun main():int {
|
||||
var i: it
|
||||
i + "works"
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user