~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/tests/test/cg/variants/tvarol94.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{ %fail }
 
2
{$ifdef fpc}
 
3
{$mode delphi}
 
4
{$endif fpc}
 
5
 
 
6
{$ifdef FPC_COMP_IS_INT64}
 
7
type 
 
8
  comp = double;
 
9
{$endif FPC_COMP_IS_INT64}
 
10
procedure test(a: word); overload;
 
11
  begin
 
12
    writeln('word called instead of smallint');
 
13
    writeln('XXX')
 
14
  end;
 
15
 
 
16
procedure test(a: smallint); overload;
 
17
  begin
 
18
    writeln('smallint called instead of word');
 
19
    writeln('YYY')
 
20
  end;
 
21
 
 
22
var
 
23
  v: variant;
 
24
  x: word;
 
25
  y: smallint;
 
26
 
 
27
begin
 
28
  try
 
29
    v := x;
 
30
    test(v);
 
31
  except
 
32
    on E : TObject do
 
33
      writeln('QQQ');
 
34
  end;
 
35
 
 
36
  try
 
37
    v := y;
 
38
    test(v);
 
39
  except
 
40
    on E : TObject do
 
41
      writeln('VVV');
 
42
  end;
 
43
end.