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

error: ‘T2_’ undeclared and error: incompatible types when assigning to type ‘void *’ #24361

Open
tersec opened this issue Oct 25, 2024 · 0 comments
Assignees

Comments

@tersec
Copy link
Contributor

tersec commented Oct 25, 2024

Description

proc m(): auto =
  let w = 0
  proc(_: int): int = w
const n = m()
template v(x: int): int = n(x)    # same issue if it's a `proc`/`func`
discard v(default(int))

Nim Version

Nim Compiler Version 2.0.10 [Linux: amd64]
Compiled at 2024-10-25
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: e941ee15be775fe3c46db1bed9b4f41c7dfb1334
active boot switches: -d:release
Nim Compiler Version 2.0.11 [Linux: amd64]
Compiled at 2024-10-25
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 76d834c1821f77b9f73b581f16895a1d2d1add11
active boot switches: -d:release
Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-25
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 78983f1876726a49c69d65629ab433ea1310ece1
active boot switches: -d:release
Nim Compiler Version 2.2.1 [Linux: amd64]
Compiled at 2024-10-25
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 820e2bee9c14916f719815be0460fc09e8067531
active boot switches: -d:release

Current Output

Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread   -I/tmp/nimdevel/lib -I/tmp -o /tmp/tmp.51F8aYtv1x/@mb.nim.c.o /tmp/tmp.51F8aYtv1x/@mb.nim.c' failed with exit code: 1

Expected Output

No invalid C codegen

Known Workarounds

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants