summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw3190.pp
blob: 6c8b90b9db773cf4e7a2ff9ae1650ccedf87f7b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ Source provided for Free Pascal Bug Report 3190 }
{ Submitted by "Martin Schreiber" on  2004-06-28 }
{ e-mail:  }
program test;

{$mode delphi}

uses
 TypInfo,Classes;
var
 po1: ptypeinfo;
begin
 po1:= typeinfo(tcomponent);   //compile error: 'Illegal parameter list'
 if po1 <> nil then begin      //compiles on kylix, result: 'TComponent'
  writeln(po1^.name);
 end
 else begin
  writeln('typeinfo(tcomponent) = nil');
 end;
 po1:= typeinfo(tobject);      //compile error: 'Illegal parameter list'
 if po1 <> nil then begin      //compiles on kylix, result: 'TObject'
  writeln(po1^.name);
 end
 else begin
  writeln('typeinfo(tobject) = nil');
 end;
end.