cx
cx copied to clipboard
Compiler Error: funcs can be called without parentheses....
....when the func lives in a package, and is called with package prefix (from outside package).
To Reproduce
The quickest way to verify this would be to go into the "cx-games" repo at "github.com\skycoin\cx-games\issues\136" and run the 2 files there with "cx ." but you can alternatively do the following 3 steps:
- put the following code in your main file:
package main import "pkg"
func main () { pkg.FuncInPkg }
- put the following code in a file named "pkg":
package pkg
func FuncInPkg () { str.print("FuncInPkg called WITH NO PARENTHESES") }
- see that the function calls without raising an error
Expected behavior Some kind of error or at least a warning that you didn't use parentheses.
Desktop:
- OS: Windows 10
- CX Version 0.7.0
Also parser error, should reject