ajterr:10056

This is an old revision of the document!


Constructors cannot directly have generic type parameters (AJTERR10056)

Product(s) Karo.Net Compiler

A function marked with the sl.attributes::constructor attribute must not have any generic type parameters. This is due to the fact, when calling a constructor the type arguments get passed to the type and not the constructor.

[constructor]
test<T> ||: void {
//  ^^^ Constructors cannot have any generic type parameters.
}

Add these type parameters to the type definition-

  • ajterr/10056.1759068340.txt.gz
  • Last modified: 2026-06-17 00:19
  • (external edit)