Lars Fosdal 1792 Posted December 18, 2018 https://quality.embarcadero.com/browse/RSP-23024 Quote If a record helper has a class constructor, the compiler will output the following error [dcc32 Warning] W1035 Return value of function 'THelperType.ClassConstructorName' might be undefined This doesn't make sense, since a class constructor doesn't have an assignable result value. Note that the class constructor actually works as expected - it is only the bogus warning that is a problem. Our build server is configured to not accept warning W1035, to ensure that we actually never release code which may have undefined return values, so this false warning is a problem. MCVE attatched to report. Share this post Link to post
Stefan Glienke 2002 Posted December 18, 2018 Quote so this false warning is a problem. Not really as you can turn off this warning with {$WARN NO_RETVAL OFF} Share this post Link to post
Lars Fosdal 1792 Posted December 18, 2018 8 minutes ago, Stefan Glienke said: Not really as you can turn off this warning with {$WARN NO_RETVAL OFF} That is a good point. I ended up calling a class method that do the init code in the unit init section. It still is a strange warning, though. Share this post Link to post