2
0
Эх сурвалжийг харах

+ allow absolute to absolute symbols, resolves issue #32474

git-svn-id: trunk@37379 -
florian 7 жил өмнө
parent
commit
c0feaf1f1e

+ 1 - 0
.gitattributes

@@ -15801,6 +15801,7 @@ tests/webtbs/tw3227a.pp svneol=native#text/plain
 tests/webtbs/tw3235.pp svneol=native#text/plain
 tests/webtbs/tw3235a.pp svneol=native#text/plain
 tests/webtbs/tw3241a.pp svneol=native#text/plain
+tests/webtbs/tw32474.pp svneol=native#text/pascal
 tests/webtbs/tw3252.pp svneol=native#text/plain
 tests/webtbs/tw3255.pp svneol=native#text/plain
 tests/webtbs/tw3257.pp svneol=native#text/plain

+ 1 - 1
compiler/pdecvar.pas

@@ -1240,7 +1240,7 @@ implementation
               if (hp.nodetype=loadn) then
                 begin
                   { we should check the result type of loadn }
-                  if not (tloadnode(hp).symtableentry.typ in [fieldvarsym,staticvarsym,localvarsym,paravarsym]) then
+                  if not (tloadnode(hp).symtableentry.typ in [fieldvarsym,staticvarsym,localvarsym,paravarsym,absolutevarsym]) then
                     Message(parser_e_absolute_only_to_var_or_const);
                   abssym:=cabsolutevarsym.create(vs.realname,vs.vardef);
                   abssym.fileinfo:=vs.fileinfo;

+ 7 - 0
tests/webtbs/tw32474.pp

@@ -0,0 +1,7 @@
+{ %norun }
+var
+  b1: byte absolute $50;
+  b2: byte absolute b1;
+begin
+  b1 := 3;
+end.