tgenericbodyreturn3.nim 332 B

1234567891011121314
  1. discard """
  2. errormsg: "cannot instantiate: 'ShouldNotResolve'"
  3. """
  4. # issue #24091
  5. type Generic[U] = object
  6. proc foo[ShouldNotResolve](x: typedesc[ShouldNotResolve]): ShouldNotResolve =
  7. echo ShouldNotResolve # Generic
  8. echo declared(result) # true
  9. echo typeof(result) # Generic
  10. echo typeof(foo(Generic)) # void
  11. foo(Generic)