mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 20:31:45 +02:00
* new bug
This commit is contained in:
parent
f4db4860b5
commit
2fb9b2748a
19
tests/webtbs/tw2834.pp
Normal file
19
tests/webtbs/tw2834.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 2834 }
|
||||||
|
{ Submitted by "Mattias Gaertner" on 2003-12-06 }
|
||||||
|
{ e-mail: matias@freepascal.org }
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
uw2834;
|
||||||
|
|
||||||
|
var
|
||||||
|
l1,l2 : pointer;
|
||||||
|
begin
|
||||||
|
writeln('Should be the same:');
|
||||||
|
l1:=PrintTypeInfo;
|
||||||
|
l2:=pointer(TypeInfo(TMyType));
|
||||||
|
writeln(cardinal(l1),' - ',cardinal(l2));
|
||||||
|
if l1<>l2 then
|
||||||
|
halt(1);
|
||||||
|
end.
|
||||||
|
|
19
tests/webtbs/uw2834.pp
Normal file
19
tests/webtbs/uw2834.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
unit uw2834;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
type
|
||||||
|
TMyType = 1..2;
|
||||||
|
|
||||||
|
function PrintTypeInfo:pointer;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
function PrintTypeInfo:pointer;
|
||||||
|
begin
|
||||||
|
result:=pointer(TypeInfo(TMyType));
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user