Skip to content

[cli] Bug #26 followup: Generated Go file missing 'im... #27

@MarkEdmondson1234

Description

@MarkEdmondson1234

Bug #26 followup: Generated Go file missing 'import "math"'

Error:

sim_gen/bridge.go:75:27: undefined: math

Generated code uses math.Pi, math.Sin, math.Cos but the file is missing:

import "math"

Header of sim_gen/bridge.go shows no imports:

// Code generated by ailang. DO NOT EDIT.
package sim_gen

func screenWidth_impl(...

Codegen needs to add the math import when std/math functions are used.


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