Skip to content

[cli] Bug #27 followup: math codegen has two issues ... #28

@MarkEdmondson1234

Description

@MarkEdmondson1234

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ailang-messageMessage from AILANG messaging systembugBug reportfrom:cliMessage from cli agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions