Board index » delphi » Internal error: URW337 on compile

Internal error: URW337 on compile

One of my units reports internal error URW337 on
compile in Delphi2 (works fine in Delphi1).  the
error is reported to occur two lines past the last
line of the file.  Any ideas?

-Erik Johnson
e...@phidias.colorado.edu
http://phidias.colorado.edu/vgallery.html

 

Re:Internal error: URW337 on compile


Quote
Erik Johnson wrote:

> One of my units reports internal error URW337 on
> compile in Delphi2 (works fine in Delphi1).  the
> error is reported to occur two lines past the last
> line of the file.  Any ideas?

Okay, I figured out what is causing it....

type TMyClass = Class( tobject )
       PROCEDURE AMethod; virtual; abstract;
     end;
     PMyClassTypeReference = TMyClass;

that will do it.  defining a type to equal a class that
has abstract methods is the problem.  Thing is, I need
my reference for now, as I am porting from old objects
to new classes and need to define what was the pointer
to be the class.  What do I do?

-Erik Johnson
e...@phidias.colorado.edu
http://phidias.colorado.edu/vgallery.html

Re:Internal error: URW337 on compile


Quote
In article <3291AED7.6...@phidias.colorado.edu> Erik Johnson <e...@phidias.colorado.edu> writes:
>Erik Johnson wrote:

>> One of my units reports internal error URW337 on
>> compile in Delphi2 (works fine in Delphi1).  the
>> error is reported to occur two lines past the last
>> line of the file.  Any ideas?
>Okay, I figured out what is causing it....
>type TMyClass = Class( tobject )
>       PROCEDURE AMethod; virtual; abstract;
>     end;
>     PMyClassTypeReference = TMyClass;
>that will do it.  defining a type to equal a class that
>has abstract methods is the problem.  Thing is, I need
>my reference for now, as I am porting from old objects
>to new classes and need to define what was the pointer
>to be the class.  What do I do?

What you first need to do is to file a bug report with Borland.  Then, I'm
afraid that you are going to have to do some fancy footwork.  Maybe something
as simple as inserting another "type" keyword might nudge the compiler into a
different code-path where the bug doesn't occur.

Re:Internal error: URW337 on compile


Quote
> What you first need to do is to file a bug report with Borland.  Then, I'm
> afraid that you are going to have to do some fancy footwork.  Maybe something
> as simple as inserting another "type" keyword might nudge the compiler into a
> different code-path where the bug doesn't occur.

I tried work arounds.  Whatever unit the 2nd reference is generated in
will cause the error.  Just makes more porting task more difficult,
but I'll grudgingly get by.  Fortunately I don't have many pointer
references to the abstract base class.

-Erik Johnson
e...@phidias.colorado.edu
http://phidias.colorado.edu/vgallery.html

Re:Internal error: URW337 on compile


Quote
Erik Johnson wrote:

> Erik Johnson wrote:

> > One of my units reports internal error URW337 on
> > compile in Delphi2 (works fine in Delphi1).  the
> > error is reported to occur two lines past the last
> > line of the file.  Any ideas?

> type TMyClass = Class( tobject )
>        PROCEDURE AMethod; virtual; abstract;
>      end;
>      PMyClassTypeReference = TMyClass;

> that will do it.  defining a type to equal a class that
> has abstract methods is the problem.  

I can't reproduce your problem (Delphi 2.01), so I can't
test if

PMyClassTypeReference = type TMyClass;

would work.

M.

--
Ettertraktet kaffe, er det ekstra god kaffe?

mailto:martin.lars...@delfi-data.msmail.telemax.no
http://www.delfidata.no/users/~martin

Other Threads