mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 13:39:36 +02:00
* fix for Mantis #31465: only consider non-static fields when checking whether a record may be used with Default()
+ added test (Note: the test fails due to missing = operator, but without the fix there was a stack overflow) git-svn-id: trunk@35508 -
This commit is contained in:
parent
c16238e8dd
commit
ece13bcc5a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13835,6 +13835,7 @@ tests/webtbf/tw3114.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3116.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3126.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3145.pp svneol=native#text/plain
|
||||
tests/webtbf/tw31465.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw3183.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3186.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3218.pp svneol=native#text/plain
|
||||
|
@ -3519,7 +3519,7 @@ implementation
|
||||
for i:=0 to def.symtable.symlist.count-1 do
|
||||
begin
|
||||
sym:=tsym(def.symtable.symlist[i]);
|
||||
if sym.typ<>fieldvarsym then
|
||||
if (sym.typ<>fieldvarsym) or (sp_static in sym.symoptions) then
|
||||
continue;
|
||||
if not is_valid_for_default(tfieldvarsym(sym).vardef) then
|
||||
begin
|
||||
|
25
tests/webtbf/tw31465.pp
Normal file
25
tests/webtbf/tw31465.pp
Normal file
@ -0,0 +1,25 @@
|
||||
{ %FAIL }
|
||||
|
||||
program tw31465;
|
||||
|
||||
{$MODE DELPHI}
|
||||
|
||||
uses
|
||||
FGL;
|
||||
|
||||
type
|
||||
THWAddr = record
|
||||
public type
|
||||
THWBytes = array [0..5] of Byte;
|
||||
private
|
||||
FValue: THWBytes;
|
||||
public
|
||||
class var Empty: THWAddr;
|
||||
class var Broadcast: THWAddr;
|
||||
end;
|
||||
|
||||
TGWCache = class(TFPGList<THWAddr>);
|
||||
|
||||
begin
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user