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: internal error: getTypeDescAux(tyExpr) when getting the type of an element of varargs[expr] #1154

Closed
ReneSac opened this issue Apr 26, 2014 · 2 comments

Comments

@ReneSac
Copy link
Contributor

ReneSac commented Apr 26, 2014

When using simple expr it manages to get the type right as int.

import typetraits

proc foo(a:varargs[expr]) =
  echo a[0].type.name

foo(1)

Results in:

Error: internal error: getTypeDescAux(tyExpr)
Traceback (most recent call last)
nimrod.nim(91)           nimrod
nimrod.nim(55)           handleCmdLine
main.nim(308)            mainCommand
main.nim(73)             commandCompileToC
modules.nim(194)         compileProject
modules.nim(152)         compileModule
passes.nim(193)          processModule
passes.nim(137)          processTopLevelStmt
cgen.nim(1293)           myProcess
ccgstmts.nim(1004)       genStmts
ccgexprs.nim(1940)       expr
ccgstmts.nim(1004)       genStmts
ccgexprs.nim(2003)       expr
cgen.nim(882)            genProc
cgen.nim(836)            genProcNoForward
cgen.nim(824)            genProcPrototype
ccgtypes.nim(693)        genProcHeader
ccgtypes.nim(297)        genProcParams
ccgtypes.nim(275)        getParamTypeDesc
ccgtypes.nim(557)        getTypeDescAux
ccgtypes.nim(634)        getTypeDescAux
msgs.nim(842)            internalError
msgs.nim(780)            rawMessage
msgs.nim(777)            rawMessage
msgs.nim(730)            handleError
@dom96 dom96 added the Semcheck label Aug 14, 2014
@genotrance
Copy link
Contributor

Doesn't crash with latest #head.

Hint: used config file 'c:\Users\gt\Desktop\dl\programming\nimdevel\config\nim.cfg' [Conf]
Hint: system [Processing]
Hint: temp [Processing]
Hint: typetraits [Processing]
temp.nim(3, 20) Warning: expr is deprecated [Deprecated]
temp.nim(3, 9) Error: invalid type: 'expr' in this context: 'proc (a: varargs[expr])' for proc
Traceback (most recent call last)
nim.nim(121)             nim
nim.nim(77)              handleCmdLine
main.nim(173)            mainCommand
main.nim(77)             commandCompileToC
modules.nim(242)         compileProject
modules.nim(182)         compileModule
passes.nim(250)          processModule
passes.nim(139)          processTopLevelStmt
sem.nim(576)             myProcess
sem.nim(544)             semStmtAndGenerateGenerics
semstmts.nim(1929)       semStmt
semexprs.nim(797)        semExprNoType
semexprs.nim(2414)       semExpr
semstmts.nim(1678)       semProc
semstmts.nim(1594)       semProcAux
sem.nim(231)             paramsTypeCheck
sem.nim(228)             typeAllowedCheck
msgs.nim(1055)           localError
msgs.nim(1037)           liMessage
msgs.nim(891)            handleError
msgs.nim(876)            quit

@andreaferretti
Copy link
Collaborator

Confirmed, does not crash anymore

Araq pushed a commit that referenced this issue Apr 18, 2018
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Feb 29, 2024
## Summary
GitHub now provides free M1 machines for CI, which means we get to have
M1 test coverage and binaries!

For more information, see

https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

## Details
* Updates to download/upload compiler actions:
  * Added awareness for runner architecture
  * Added a small workaround for  `shell: python`  not being compatible
with M1 CI
* Removed  `-lm`  compiler flags for macOS, as it is not required and
was causing
  warnings that broke tests.
* `temit.nim` is modified to include `stdio.h` due to `printf` usage.
* Disabled float-to-uint tests in  `tnumeric_conversions`  for non-x86
targets due
  to reliance on undefined behavior. See
nim-works/nimskull#1155.

---------

Co-authored-by: Saem Ghani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants