Carp icon indicating copy to clipboard operation
Carp copied to clipboard

[bug] duplicate bindings in environment

Open scolsen opened this issue 2 years ago • 2 comments

C:\Users\marti\tmp\Carp>carp examples\game_of_life.carp -x I encountered an error when emitting code:

I found an ambiguous symbol set-render-draw-color at line 52, column 8 in 'C:/Users/marti/tmp/Carp/examples/game_of_life.carp'

Possibilities: SDL.set-render-draw-color SDL.set-render-draw-color SDL.set-render-draw-color SDL.set-render-draw-color

All possibilities have the correct type.

Traceback: (build) at Compiler (Build & Run):1:5. (do (build) (run)) at Compiler (Build & Run):1:1.

scolsen avatar Jan 31 '23 20:01 scolsen

The example game_of_life.carp seems to use SDL submodules multiple times:

https://github.com/carp-lang/Carp/blob/ca5774b1aeeab2bc4d6fa901b5a55682ebc2d539/examples/game_of_life.carp#L9-L14

This seems to lead to duplicate symbols being part of the environment.

hellerve avatar Jan 31 '23 20:01 hellerve

FWIW commenting out (use SDLApp) doesn't change the behaviour at all. Same error message.

MatthewHannigan avatar Mar 10 '23 23:03 MatthewHannigan