mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 19:06:13 +02:00
* real bug #2953 instead of 2956
This commit is contained in:
parent
a813c64e3e
commit
a77c934dda
@ -1,26 +1,10 @@
|
|||||||
{ Source provided for Free Pascal Bug Report 2956 }
|
{ Source provided for Free Pascal Bug Report 2953 }
|
||||||
{ Submitted by "Marco (Gory Bugs Department)" on 2004-02-08 }
|
{ Submitted by "" on 2004-02-07 }
|
||||||
{ e-mail: }
|
{ e-mail: Marco }
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
{$mode Delphi}
|
// Next line should give a warning only
|
||||||
Uses uw2953;
|
//$IF's are evaluated before $IFDEF's
|
||||||
|
|
||||||
type
|
|
||||||
localclassfields = class(aclasswithfields)
|
|
||||||
end;
|
|
||||||
classwithmethod = class
|
|
||||||
procedure xx;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure classwithmethod.xx;
|
|
||||||
|
|
||||||
var ll : aclasswithfields;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
writeln(localclassfields(ll).field1); // goes ok.
|
end.
|
||||||
with localclassfields(ll) do // typecast.
|
|
||||||
writeln(field1);
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
|
||||||
end.
|
|
@ -1,12 +0,0 @@
|
|||||||
unit uw2953;
|
|
||||||
{$mode Delphi}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
type
|
|
||||||
aclasswithfields = class
|
|
||||||
protected
|
|
||||||
field1:integer;
|
|
||||||
end;
|
|
||||||
implementation
|
|
||||||
end.
|
|
Loading…
Reference in New Issue
Block a user