# @Phil closest that can work for you is : type AppConfig = object of RootObj AdwAppConfig = object of AppConfig AppContext[T: AppConfig | AdwAppConfig] = object config: T let x = AppContext[AdwAppConfig](config: AdwAppConfig()) # may or may not be satisfastory, my attempts to make this work indicate either i # have a skill issue or Nim cannot make use of inheritance the way you're trying # to use it