-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Nim Version
Nim Compiler Version 2.3.1 [Linux: amd64]
Compiled at 2025-06-25
Copyright (c) 2006-2025 by Andreas Rumpf
git hash: 334848f
active boot switches: -d:release
Description
type
FooBase[T] {.inheritable.} = object
val: T
FooChild[T] = object of FooBase[T]
converter toValue*[T](r: FooBase[T]): T = r.val
proc foo(a: int) = discard
var f: FooChild[int]
foo(f)Current Output
.../test.nim(10, 5) template/generic instantiation from here
.../test.nim(6, 20) Error: cannot instantiate: 'T'
Expected Output
No compilation errors
Known Workarounds
No response