[lazarus] Name Confilct in fpc
Peter Dyson
peter at skel.demon.co.uk
Mon Feb 28 00:06:18 EST 2000
I have been playing with lazarus trying to get the mwCustomEdit .92a to
compile.
This has lots of optimizations as far as font and other resource caches
which will
probably go a long way to solving the speed, but while doing the
compile/comment
out/create new methods cycle, I came across this name conflict I cannot
resolve.
Here is a code snippet which shows the problem,
Along with the errors generated.
It would seem the compiler has some scoping issues.
Is this design or a 'feature'? :)
The code should describe the problem clearly.
{
$Author: peter $
$Revision: 1.1 $
$Log: hello.pp,v $
Revision 1.1 2000/02/28 02:04:58 peter
Initial revision
}
unit hello;
{$mode objfpc} file://tried delphi mode too
interface
uses SysUtils;
type
TSomeObject = class(TObject)
private
s, t, v: string;
public
//note made sure this is not same calling convention as Insert
procedure Insert(Dummy, Dummy1: String);
procedure NestProc;
end;
implementation
procedure TSomeObject.Insert(Dummy, Dummy1: String);
begin
writeln('Hello World Again this is yet another test');
end;
procedure TSomeObject.NestProc;
procedure Nested;
begin
s := 'A bit of text';
t := ' new';
Insert(t, s, 5); // won't compile
//error "hello.pp" 41 Wrong amount of parameters specified
end;
begin
s := 'A bit of text';
t := ' new';
SysUtils.Insert(t, s, 5); // won't compile
//error "hello.pp 48 Identifier not found INSERT
writeln('Hello World Again this is yet another test');
end;
end.
More information about the Lazarus
mailing list