2020/01/03 16:16:32 invalid callee type; expected *types.FuncType, got *types.PointerType
Internal compiler stacktrace:
goroutine 1 [running]:
runtime/debug.Stack(0xc0000ea500, 0x1, 0x1)
/Users/gustav/src/go/src/runtime/debug/stack.go:24 +0x9d
github.com/zegl/tre/compiler/compiler.(*Compiler).Compile.func1(0xc0000ebba8)
/Users/gustav/src/tre/compiler/compiler/compiler.go:139 +0x175
panic(0x1198260, 0xc000096bb0)
/Users/gustav/src/go/src/runtime/panic.go:679 +0x1b2
github.com/llir/llvm/ir.(*InstCall).Sig(0xc0000f00e0, 0xc0000f00e0)
/Users/gustav/go/pkg/mod/github.com/llir/[email protected]/ir/inst_other.go:420 +0x1a0
github.com/llir/llvm/ir.(*InstCall).Type(...)
/Users/gustav/go/pkg/mod/github.com/llir/[email protected]/ir/inst_other.go:350
github.com/llir/llvm/ir.NewCall(0x12151a0, 0xc0000d25b0, 0xc000096ba0, 0x1, 0x1, 0x0)
/Users/gustav/go/pkg/mod/github.com/llir/[email protected]/ir/inst_other.go:336 +0x9e
github.com/llir/llvm/ir.(*Block).NewCall(...)
/Users/gustav/go/pkg/mod/github.com/llir/[email protected]/ir/block_other.go:59
github.com/zegl/tre/compiler/compiler.(*Compiler).compileCallNode(0xc0000ce000, 0xc000099170, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/gustav/src/tre/compiler/compiler/func.go:533 +0x901
github.com/zegl/tre/compiler/compiler.(*Compiler).compileValue(0xc0000ce000, 0x1213f60, 0xc000099170, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/gustav/src/tre/compiler/compiler/compiler.go:286 +0x459
github.com/zegl/tre/compiler/compiler.(*Compiler).compileCallNode(0xc0000ce000, 0xc0000991a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/gustav/src/tre/compiler/compiler/func.go:463 +0x1620
github.com/zegl/tre/compiler/compiler.(*Compiler).compileValue(0xc0000ce000, 0x1213f60, 0xc0000991a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/gustav/src/tre/compiler/compiler/compiler.go:286 +0x459
github.com/zegl/tre/compiler/compiler.(*Compiler).compile(0xc0000ce000, 0xc0000d0800, 0x3, 0x4)
/Users/gustav/src/tre/compiler/compiler/compiler.go:220 +0x127
github.com/zegl/tre/compiler/compiler.(*Compiler).compileDefineFuncNode(0xc0000ce000, 0xc0000d4100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/gustav/src/tre/compiler/compiler/func.go:229 +0x1255
github.com/zegl/tre/compiler/compiler.(*Compiler).compile(0xc0000ce000, 0xc0000d0840, 0x3, 0x4)
/Users/gustav/src/tre/compiler/compiler/compiler.go:183 +0x1da
github.com/zegl/tre/compiler/compiler.(*Compiler).Compile(0xc0000ce000, 0xc0000a66c0, 0x1, 0x1, 0x11d43e9, 0x4, 0x0, 0x0)
/Users/gustav/src/tre/compiler/compiler/compiler.go:151 +0x196
github.com/zegl/tre/cmd/tre/build.compilePackage(0xc0000ce000, 0x7ffeefbffa41, 0x22, 0xc0000ebf30, 0x2, 0x2, 0x11d43e9, 0x4, 0x19, 0xc000052e68)
/Users/gustav/src/tre/cmd/tre/build/build.go:164 +0x2e4
github.com/zegl/tre/cmd/tre/build.Build(0x7ffeefbffa41, 0x22, 0xc0000dbf30, 0x2, 0x2, 0x7ffeefbffa53, 0xd, 0xc000050001, 0x19, 0xc0000c0320)
/Users/gustav/src/tre/cmd/tre/build/build.go:24 +0xac
main.main()
/Users/gustav/src/tre/cmd/tre/main.go:52 +0x327