Hi, thank you for creating this language! It looks interesting. I've been looking into it today and investigating ways it might be possible for me to create Cyber bindings for an object-oriented C++ library.
In the process I came across this oddity. The first thing that I remarked is that it's legal to define out-of-body functions for traits. When using this feature with the $call operator, I encountered a "TODO" error message:
type A trait:
-- Dummy function to avoid parse error with empty type
func dummyfunc(self) float
type B:
with A
func dummyfunc(self) float:
return 0
-- Works
func A.test() float:
return 1
print(A.test())
-- Works
func B.$call() float:
return 2
print(B())
-- Fails
func A.$call() float:
return 2
print(A())
CompileError: error.TODO
eval:27:7:
print(A())
^
Is this intended to work, or are out-of-body functions under traits not supposed to work to begin with?
Hi, thank you for creating this language! It looks interesting. I've been looking into it today and investigating ways it might be possible for me to create Cyber bindings for an object-oriented C++ library.
In the process I came across this oddity. The first thing that I remarked is that it's legal to define out-of-body functions for traits. When using this feature with the
$call
operator, I encountered a "TODO" error message:Is this intended to work, or are out-of-body functions under traits not supposed to work to begin with?