mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 01:49:35 +02:00
* fix for Mantis #36223: when parsing a helper type its extendeddef might be Nil
+ added test git-svn-id: trunk@43346 -
This commit is contained in:
parent
f481587bee
commit
fdeaacac21
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -16071,6 +16071,7 @@ tests/webtbf/tw3583.pp svneol=native#text/plain
|
||||
tests/webtbf/tw35866.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw35981.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw36114.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw36223.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw3626.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3631.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3643.pp svneol=native#text/plain
|
||||
|
@ -3916,8 +3916,17 @@ implementation
|
||||
exit;
|
||||
end;
|
||||
{ now search all helpers using the extendeddef as the starting point }
|
||||
if m_multi_helpers in current_settings.modeswitches then
|
||||
result:=search_best_objectpascal_helper(s,classh.extendeddef,contextclassh,srsym,srsymtable);
|
||||
if (m_multi_helpers in current_settings.modeswitches) and
|
||||
(
|
||||
(current_structdef<>classh) or
|
||||
assigned(classh.extendeddef)
|
||||
) then
|
||||
begin
|
||||
{ this is only allowed if classh is currently parsed }
|
||||
if not assigned(classh.extendeddef) then
|
||||
internalerror(2019110101);
|
||||
result:=search_best_objectpascal_helper(s,classh.extendeddef,contextclassh,srsym,srsymtable);
|
||||
end;
|
||||
end;
|
||||
|
||||
function search_specific_assignment_operator(assignment_type:ttoken;from_def,to_def:Tdef):Tprocdef;
|
||||
|
18
tests/webtbf/tw36223.pp
Normal file
18
tests/webtbf/tw36223.pp
Normal file
@ -0,0 +1,18 @@
|
||||
{ %FAIL }
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch multihelpers}
|
||||
|
||||
unit tw36223;
|
||||
interface
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
type
|
||||
// ERROR: Compilation raised exception internally
|
||||
TMyHelper = class helper for TSomeObject
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user