Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect "named param already provided" error #12174

PMunch opened this issue Sep 11, 2019 · 1 comment


Copy link

commented Sep 11, 2019

After updating to the latest devel branch and running some old code I ran into an issue when using the SDL library:

/home/peter/Projects/pimo/layouttest.nim(335, 15) Error: type mismatch: got <RendererPtr, r: int literal(0), g: int literal(0), b: int literal(0)>
but expected one of: 
proc setDrawColor(renderer: RendererPtr; c: Color)
  first type mismatch at position: 2
  named param already provided: r
proc setDrawColor(renderer: RendererPtr; r, g, b: uint8; a = 255'u8): SDL_Return
  first type mismatch at position: 2
  named param already provided: r

expression: setDrawColor(renderer, r = 0, g = 0, b = 0)

Essentially it seems like passing named args here is somehow broken.

@Araq Araq closed this in 99425ff Sep 11, 2019


This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

Works like a charm now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.