diff --git a/Source/uPSCompiler.pas b/Source/uPSCompiler.pas index f13307e2..784bf1a6 100644 --- a/Source/uPSCompiler.pas +++ b/Source/uPSCompiler.pas @@ -15678,7 +15678,10 @@ procedure TPSCompileTimeClass.RegisterProperty(const PropertyName, if FType = nil then begin p.Free; - Exit; + // dropping the property silently leads to hard-to-diagnose 'Unknown + // identifier' errors in scripts; report the unresolved type instead + raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterType, + [PropertyName + ': ' + PropertyType]); end; if p.Decl.Result = nil then p.Decl.Result := FType else begin