You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import./c
export c
templateK*(kind: staticint): auto=typedesc[c.K]
templateB*(kind: staticint): auto=typedesc[c.K]
p.nim:
import./s
discarddefault(K(0)) # worksdiscarddefault(s.B(0)) # worksdiscarddefault(s.K(0)) # doesn't work
Nim Version
Nim Compiler Version 2.0.10 [Linux: amd64]
Compiled at 2024-07-25
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 92e505577e8b6b9214b6fcdd7fe1b0e9a244023b
active boot switches: -d:release
Nim Compiler Version 2.1.9 [Linux: amd64]
Compiled at 2024-07-25
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 469a6044c00ce657d2f543f292678b3c71e0b037
active boot switches: -d:release
Current Output
p.nim(4, 20) Error: type mismatch: got 'int literal(0)' for '0' but expected 'K = object'
Expected Output
That default(s.K(0)) builds if default(K(0)) and discard default(s.B(0)) build
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
tersec
changed the title
Diisambiguating module of template call with shared symbol prevents building
Disambiguating module of template call with shared symbol prevents building
Jul 25, 2024
Description
c.nim
:s.nim
:p.nim
:Nim Version
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: