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

* allow passing read-only typedconsts to const parameters

git-svn-id: trunk@242 -
peter 20 жил өмнө
parent
commit
393101a64d
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      compiler/htypechk.pas

+ 2 - 1
compiler/htypechk.pas

@@ -1153,7 +1153,8 @@ implementation
                    typedconstsym :
                      begin
                        if ttypedconstsym(tloadnode(hp).symtableentry).is_writable or
-                          (valid_addr in opts) then
+                          (valid_addr in opts) or
+                          (valid_const in opts) then
                         result:=true
                        else
                         CGMessagePos(hp.fileinfo,type_e_no_assign_to_const);