some bug fixes, templated operator method overloading
This commit is contained in:
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