Test suite results for test file webtbs/tw2454.pp

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all tests

Test file "webtbs/tw2454.pp" information:

t_id 959
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Successfully run 50 100.0 2024/05/20 10:48:00 38 2024/05/20 22:58:00 148
i386 13 26.0 2024/05/20 16:23:00 44 2024/05/20 22:37:00 176
m68k 1 2.0 2024/05/20 22:44:00 190 2024/05/20 22:44:00 190
arm 1 2.0 2024/05/20 22:30:00 59 2024/05/20 22:30:00 59
x86_64 13 26.0 2024/05/20 13:38:00 23 2024/05/20 19:35:00 26
mips 3 6.0 2024/05/20 12:35:00 35 2024/05/20 22:51:00 240
mipsel 1 2.0 2024/05/20 22:58:00 148 2024/05/20 22:58:00 148
aarch64 18 36.0 2024/05/20 10:48:00 38 2024/05/20 22:24:00 44
linux 13 26.0 2024/05/20 10:48:00 38 2024/05/20 22:58:00 148
solaris 12 24.0 2024/05/20 16:23:00 44 2024/05/20 17:30:00 45
darwin 12 24.0 2024/05/20 16:20:00 32 2024/05/20 17:50:00 56
win64 13 26.0 2024/05/20 13:38:00 23 2024/05/20 19:35:00 26
3.3.1 8 16.0 2024/05/20 12:35:00 35 2024/05/20 19:35:00 26
3.2.2 12 24.0 2024/05/20 16:23:00 44 2024/05/20 17:30:00 45
3.2.3 30 60.0 2024/05/20 10:48:00 38 2024/05/20 22:58:00 148

Source:

{ Source provided for Free Pascal Bug Report 2454 }
{ Submitted by "Nikolay Nikolov" on  2003-04-06 }
{ e-mail: nickysn1983@netscape.net }
{$MODE objfpc}
Program Test;

Type
  TFunClass = Class(TObject)
    Class Procedure FunProc(q : TFunClass);
    data : Integer;
  End;

Class Procedure TFunClass.FunProc(q : TFunClass);

Begin
  Writeln(q.data);
  With q Do
  Begin
    Writeln(q.data);

    Writeln(data); { fpc 1.1 says: Error: Only class methods can be accessed in class methods

    this is a bug, because 'data' actually means 'q.data' due to the 'with' statement,
    (this can be seen if you make this a normal method by removing the 'Class' keyword
    and running the program, it will writeln q.data, not self.data)
    so it shouldn't cause an error
    }
  End;
End;

Var
  c1, c2 : TFunClass;

Begin
  c1 := TFunClass.Create;
  c2 := TFunClass.Create;
  c1.data := 5;
  c2.data := 7;
  c1.FunProc(c2);
  c1.Destroy;
  c2.Destroy;
End.

Link to SVN view of webtbs/tw2454.pp source.