tuninstobjconstr.nim 255 B

123456789101112
  1. # issue #24372
  2. type
  3. Foo[T] = object
  4. x: string
  5. proc initFoo(): Foo[string] =
  6. Foo(x: "hello") #[tt.Error
  7. ^ cannot instantiate: 'Foo[T]'; the object's generic parameters cannot be inferred and must be explicitly given]#
  8. discard initFoo()