After bug 162983 is fixed, this bug is about this Basic code: Option VBASupport 1 Property Set foo(x) End Function Function Let bar(x) End Sub This should be two error; both Property Set and Property Let must be terminated with End Property. However, this code should work: Option VBASupport 1 Property Get foo End Function Function Get bar End Sub For some strange reason, VBA allows that. And i#109075 (https://bz.apache.org/ooo/show_bug.cgi?id=109075) implemented the support for these latter cases, see SbiParser::Parse (basic/source/comp/parser.cxx). The existing implementation is too forgiving; it must only allow the closing "End Sub/Function" for the Property Get case. See SbiParser::DefProc (basic/source/comp/dim.cxx), which handles the Get/Set/Let distinction, and calls SbiProcDef::setPropertyMode to store that distinction in the definition. That stored information should be used in SbiParser::Parse to filter out the invalid cases.
(In reply to Mike Kaganski from comment #0) > Function Let bar(x) > ... > Function Get bar Typos here; intended to be Property Let bar(x) and Property Get bar
Razvan Degeratu committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7744d3134b0308ea2f2cb87177022269a55fff00 tdf#162986 Restrict ending of Property Let and Set to only End Property It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Razvan: if this is done, feel free to mark as fixed.