I get a compilation error with this code:
class Cmd(C) end class Adm < Cmd(Int32) end class Ns(C) getter cmds : Array(Cmd(C).class) = Array(Cmd(C).class).new end ns = Ns(Int32).new
instance variable '@cmds' of Ns(Int32) must be Array(Cmd(C).class), not Array(Cmd(Int32).class)
If i change the array type by removing “.class”, then it compiles. I am unsure about what is wrong with this.