TP0224
Error: invalid decorator
Messages
Section titled “Messages”unknown decorator '@<d>''@<d>' cannot be used here(with help'@dataclass' goes on a class, '@override' on a method)duplicate decorator '@<d>''@<d>' cannot be used here, with help'@<d>' goes on a method, for a method’s decorator elsewhere'@<a>' cannot be combined with '@<b>''@abstractmethod' needs a class deriving from 'ABC''@<x>.setter' needs a property '<x>' just above it(M28)
Example
Section titled “Example”From the golden case tests/cases/m39/tp0224_decorators.tpn:
@dataclass(slots=True)class A: n: int
@dataclass(frozen=1)class B: n: int
@final(strict=True)class C: passThe compiler reports:
tp0224_decorators.tpn:1:1: error TP0224: '@dataclass' takes only 'frozen=' and 'order=', each True or Falsetp0224_decorators.tpn:5:1: error TP0224: '@dataclass' takes only 'frozen=' and 'order=', each True or Falsetp0224_decorators.tpn:9:1: error TP0224: '@final' takes no argumentsThe specification lists every code.
© 2026 Discover Edge, LLC · Taipan is released under the MIT License.