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

Array of types (typedesc) crashes the compiler #14305

Closed
kraptor opened this issue May 11, 2020 · 3 comments
Closed

Array of types (typedesc) crashes the compiler #14305

kraptor opened this issue May 11, 2020 · 3 comments

Comments

@kraptor
Copy link
Contributor

kraptor commented May 11, 2020

Creating an array of types, crashes the compiler.

Example

let types = [int, uint] 

Current Output

Error: internal error: getTypeDescAux(tyNone)
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>

But this works:

const types = [int, uint] 

Expected Output

A nice error if forbidden on a non-static context.

Possible Solution

Not sure.

Additional Information

Latest version on Nim playground:
https://play.nim-lang.org/#ix=2lEF

On my computer:

$ nim -v
Nim Compiler Version 1.2.0 [Windows: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff
active boot switches: -d:release
@ghost
Copy link

ghost commented May 11, 2020

Duplicate of #12398

@kraptor
Copy link
Contributor Author

kraptor commented May 11, 2020

thanks @Yardanico, I wasn't able to find the other one 👍

@ghost
Copy link

ghost commented May 11, 2020

@kraptor close then? :)

@kraptor kraptor closed this as completed May 11, 2020
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

1 participant