TPSCompileTimeClass.RegisterProperty freed the half-built property and
returned silently when its type string referenced a type that was not
(yet) registered. Scripts using the property then failed with a bare
'Unknown identifier' - very hard to trace back to a wrong registration
order in an import unit. This is the actual root cause behind reports
like issue remobjects#255 ('Delphi 11 case sensitive').
Raise EPSCompilerException naming the property and its type string
instead, matching how AddTypeS and the other registration APIs report
bad input. Inside OnUses the exception surfaces as a regular compiler
error message.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TPSCompileTimeClass.RegisterProperty freed the half-built property and
returned silently when its type string referenced a type that was not
(yet) registered. Scripts using the property then failed with a bare
'Unknown identifier' - very hard to trace back to a wrong registration
order in an import unit. This is the actual root cause behind reports
like issue #255 ('Delphi 11 case sensitive').
Raise EPSCompilerException naming the property and its type string
instead, matching how AddTypeS and the other registration APIs report
bad input. Inside OnUses the exception surfaces as a regular compiler
error message.
Fixes #255 (the reported "case sensitivity" is actually this silent registration failure: the property is dropped and the script then fails with Unknown identifier).
🤖 Generated with Claude Code