mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 12:19:30 +02:00
* fixed mode objfpc
This commit is contained in:
parent
3db89ed4f1
commit
a64b526adc
@ -1,17 +1,19 @@
|
||||
unit tbs0139;
|
||||
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
interface
|
||||
uses
|
||||
objpas, tbs0139a;
|
||||
|
||||
tbs0139a;
|
||||
|
||||
type
|
||||
AnotherClass=class(SomeClass)
|
||||
protected
|
||||
procedure doSomething; override;
|
||||
end ;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
procedure AnotherClass.doSomething;
|
||||
begin
|
||||
inherited doSomething; // this causes the error: " can not call protected
|
||||
|
@ -1,19 +1,18 @@
|
||||
unit tbs0139a;
|
||||
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
objpas;
|
||||
|
||||
|
||||
type
|
||||
SomeClass=class(TObject)
|
||||
protected
|
||||
procedure doSomething; virtual;
|
||||
end ;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
|
||||
|
||||
procedure SomeClass.doSomething;
|
||||
begin
|
||||
Writeln ('Hello from SomeClass.DoSomething');
|
||||
|
@ -1,5 +1,7 @@
|
||||
program proptest;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
type
|
||||
TMyRec = record
|
||||
Int: Integer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{$OPT= -Twin32}
|
||||
{ $OPT= -Twin32}
|
||||
|
||||
program test_win32_drv;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
program TestEvent;
|
||||
|
||||
{$mode objfpc}
|
||||
{$M+}
|
||||
|
||||
type
|
||||
@ -33,7 +34,7 @@ end;
|
||||
|
||||
procedure THost.SetOnEvent( Value: TNotifyEvent );
|
||||
begin
|
||||
FOnEvent := Value
|
||||
FOnEvent := Value
|
||||
end;
|
||||
|
||||
procedure THost.SayHello;
|
||||
|
@ -1,3 +1,4 @@
|
||||
{$mode objfpc}
|
||||
type
|
||||
tobject1 = class
|
||||
readl : longint;
|
||||
|
@ -1,3 +1,5 @@
|
||||
{$mode objfpc}
|
||||
|
||||
{ tests forward class types }
|
||||
|
||||
type
|
||||
|
@ -1,3 +1,5 @@
|
||||
{$mode objfpc}
|
||||
|
||||
type
|
||||
tclass1 = class
|
||||
procedure a;virtual;
|
||||
|
Loading…
Reference in New Issue
Block a user