mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 15:32:21 +02:00
some more bugs from web page
This commit is contained in:
parent
4177d64781
commit
955d3f04aa
@ -1,4 +1,5 @@
|
|||||||
{$asmmode intel}
|
{$asmmode intel}
|
||||||
|
{$inline on}
|
||||||
|
|
||||||
procedure DoIt;
|
procedure DoIt;
|
||||||
begin
|
begin
|
||||||
|
5
tests/webtbs/tbug856.pp
Normal file
5
tests/webtbs/tbug856.pp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{$MODE objfpc}
|
||||||
|
uses tbug856u;
|
||||||
|
begin
|
||||||
|
TMyClass.Create(1);
|
||||||
|
end.
|
16
tests/webtbs/tbug856u.pp
Normal file
16
tests/webtbs/tbug856u.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{$MODE objfpc}
|
||||||
|
unit tbug856u;
|
||||||
|
interface
|
||||||
|
type
|
||||||
|
TMyClass = class
|
||||||
|
protected
|
||||||
|
constructor Create(x: Integer);
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
constructor TMyClass.Create(x: Integer);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
41
tests/webtbs/tbug873.pp
Normal file
41
tests/webtbs/tbug873.pp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{$mode objfpc}
|
||||||
|
program Teste;
|
||||||
|
|
||||||
|
// Compile it using the Delphi extensions
|
||||||
|
// directive.
|
||||||
|
|
||||||
|
type
|
||||||
|
TObject = class
|
||||||
|
private
|
||||||
|
procedure SetValue(v: integer);
|
||||||
|
public
|
||||||
|
fx: integer;
|
||||||
|
Constructor Create;
|
||||||
|
Destructor Destroy;
|
||||||
|
property x: integer read fx write SetValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Obj: TObject;
|
||||||
|
|
||||||
|
Constructor TObject.Create;
|
||||||
|
begin
|
||||||
|
fx := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Destructor TObject.Destroy;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TObject.SetValue(v: integer);
|
||||||
|
begin
|
||||||
|
fx := v + 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
writeln('This will be printed');
|
||||||
|
Obj := TObject.Create;
|
||||||
|
writeln('This won''t.');
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
40
tests/webtbs/tbug873a.pp
Normal file
40
tests/webtbs/tbug873a.pp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{$mode objfpc}
|
||||||
|
program Teste;
|
||||||
|
|
||||||
|
// Compile it using the Delphi extensions
|
||||||
|
// directive.
|
||||||
|
|
||||||
|
type
|
||||||
|
TObjectB = class
|
||||||
|
private
|
||||||
|
procedure SetValue(v: integer);
|
||||||
|
public
|
||||||
|
fx: integer;
|
||||||
|
Constructor Create;
|
||||||
|
Destructor Destroy;
|
||||||
|
property x: integer read fx write SetValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Obj: TObjectB;
|
||||||
|
|
||||||
|
Constructor TObjectB.Create;
|
||||||
|
begin
|
||||||
|
fx := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Destructor TObjectB.Destroy;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TObjectB.SetValue(v: integer);
|
||||||
|
begin
|
||||||
|
fx := v + 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
writeln('This will be printed');
|
||||||
|
Obj := TObjectB.Create;
|
||||||
|
writeln('This won''t.');
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user