* support pointer constants as initialisation values for procvar typed

constants in Delphi mode on non-treetypedconstbuilder platforms
    (mantis #21267)

git-svn-id: trunk@21344 -
This commit is contained in:
Jonas Maebe 2012-05-20 14:51:15 +00:00
parent c27f9da1b2
commit eb7e192226
3 changed files with 12 additions and 0 deletions

1
.gitattributes vendored
View File

@ -12574,6 +12574,7 @@ tests/webtbs/tw21151.pp svneol=native#text/plain
tests/webtbs/tw21177.pp svneol=native#text/plain
tests/webtbs/tw21179.pp svneol=native#text/pascal
tests/webtbs/tw21255.pp svneol=native#text/plain
tests/webtbs/tw21267.pp svneol=native#text/plain
tests/webtbs/tw2128.pp svneol=native#text/plain
tests/webtbs/tw2129.pp svneol=native#text/plain
tests/webtbs/tw2129b.pp svneol=native#text/plain

View File

@ -1282,6 +1282,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
list.concat(Tai_const.Create_sym(nil));
end
end
else if n.nodetype=pointerconstn then
list.concat(Tai_const.Create_pint(tpointerconstnode(n).value))
else
Message(parser_e_illegal_expression);
n.free;

9
tests/webtbs/tw21267.pp Normal file
View File

@ -0,0 +1,9 @@
{ %norun }
{$mode delphi}
const
GameObjectClass_Get_Metal_Cost : function(team : integer) : Integer = Pointer($004CDFA0);
begin
end.