Type mismatch when using empty tuple as generic parameter #4550

Closed
nigredo-tori opened this Issue Aug 1, 2016 · 0 comments

Projects

None yet

1 participant

@nigredo-tori
Contributor

This code:

type
  Identity[T] = ref object
    value: T

proc mkIdentity[X](x: X): Identity[X] = Identity[X](value: x)
proc f: Identity[tuple[]] = mkIdentity(())

results in following compilation error:

test_empty_tuple.nim(6, 39) Error: type mismatch: got (Identity[tuple[]]) but expected 'Identity[tuple[]]'
@Araq Araq added a commit that closed this issue Aug 3, 2016
@Araq Araq fixes #4550 e92ccff
@Araq Araq closed this in e92ccff Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment