Skip to content

NimVM generic procs that take anonymous tuples gives nil access error. #15662

Closed
@beef331

Description

When using T: typedesc and passing a anonymous tuple the NimVM is incapable of running the code

Example

static:
  proc a(T: typedesc)= echo T.type
  a(float)
  a((int, int))

Current Output

float
stack trace: (most recent call last)
/usercode/in.nim(4, 6)   in
/usercode/in.nim(4, 6) Error: attempt to access a nil address

Expected Output

float
(int, int)

Nim version

Nim Compiler Version 1.4.0 [Linux: amd64]
Compiled at 2020-10-16
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 018ae963ba83934a68d815c3c1c44c06e8ec6178

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    VMsee also `const` label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions