You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type
A[T] =object {.inheritable.}
B =objectof A[int]
const c =B() # Error: invalid type for const: Blet d {.compileTime.} =B() # Error: cannot create null element for: [T]let e =B() # Compiles as expected
T is qualified by B as int. I don't see why I shouldn't be able to create a compile time constant.
The text was updated successfully, but these errors were encountered:
ringabout
changed the title
Constant initialization fails with inheritance and generic parameter
Constant initialization fails with inheritance
Oct 1, 2021
T is qualified by B as int. I don't see why I shouldn't be able to create a compile time constant.
The text was updated successfully, but these errors were encountered: