fpc/tests/test/jvm/tset7.pp
Jonas Maebe cfca607b9b * in case of an enum without a type name (e.g., "type xx = set of (ea,eb)"),
set the external name of the underlying class type to the internal name
    instead of to an (invalid) empty string

git-svn-id: branches/jvmbackend@19555 -
2011-10-28 21:19:12 +00:00

40 lines
490 B
ObjectPascal

program tset7;
{ test for subsetreg sets }
{$packset 1}
type
ta = 0..7;
tr = record
b: byte;
a: set of ta;
w: word;
end;
procedure test(r: tr);
var
b: ta;
begin
b := 6;
if (r.b<>101) or
(r.w<>$abcd) or
(5 in r.a) or
(b in r.a) or
not(7 in r.a) or
([1..3] * r.a <> [2..3]) then
halt(1);
end;
var
r: tr;
inlineenumdefset: set of (inline1,inline2);
begin
r.b:=101;
r.w:=$abcd;
r.a:=[2..3];
include(r.a,7);
test(r);
end.