Skip to content

Conversation

@ringabout
Copy link
Member

fixes #25262

It's a half regression, gives cannot instantiate: 'v[0]' before

elif formalBase.kind == tyTypeDesc:
if arg.kind != tyTypeDesc:
if arg.kind != tyTypeDesc and
n.kind == nkSym and n.sym.kind == skType:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A type could also be seq[int]; types are more complex than "it's a symbol"...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would not these types (seq[int] be passed as typedesc, I didn't find the cases that are not passed as typedesc if not values

@ringabout ringabout marked this pull request as draft December 23, 2025 09:50
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

Successfully merging this pull request may close these issues.

proc v[T: typedesc]() = discard / v[0]() compiles even though 0 isn't a typedesc

3 participants