Bug #27 followup: math codegen has two issues
Error 1: math.Pi treated as function
sim_gen/bridge.go:77:27: invalid operation: cannot call non-function math.Pi (untyped float constant 3.14159)
AILANG PI() is a zero-arg function, but Go math.Pi is a constant. Codegen emits math.Pi() but should emit math.Pi.
Error 2: Missing type assertion for math.Sin/Cos args
sim_gen/bridge.go:108:34: cannot use angle (variable of type interface{}) as float64 value in argument to math.Sin
Variables are interface{} but math.Sin needs float64. Need: math.Sin(angle.(float64))
Reported by: cli via ailang messages
Bug #27 followup: math codegen has two issues
Error 1:
math.Pitreated as functionAILANG
PI()is a zero-arg function, but Gomath.Piis a constant. Codegen emitsmath.Pi()but should emitmath.Pi.Error 2: Missing type assertion for math.Sin/Cos args
Variables are
interface{}but math.Sin needsfloat64. Need:math.Sin(angle.(float64))Reported by: cli via ailang messages