Board index » delphi » Weird 'Incompatible types' error

Weird 'Incompatible types' error

Hi all,

I sometimes get a compiler error message:
        Incompatible types: 'xxx' and 'TDataConfig'

The message is generated for an assignment of a TDataConfig to a
TDataConfig, which is my own defined type (defined in the same unit).
I'm sure the assignment is correct.

Now, I made the following puzzling observations:
1) 'xxx' is a nonsense strings, e.g. '@#||L.('.
2) not every compile of the unit generates this message. Often
   the compiler does not complain at all.
3) when the error is reported and I select Project/Compile, the error
   is reported again, but with a different 'xxx'.
4) when I rebuild the whole project (Project/Build), the compiler
   never complains and the program runs fine.

Anyone seen this before and has any hint of where to look? Any help
is appreciated very much! My Delphi version is 2.00.

Thanks in advance,

Wim.

 

Re:Weird 'Incompatible types' error


In article <01bc2a2e$7fda33c0$1186099a@default> "Wim van Hoorn" <cade...@worldonline.nl> writes:

Quote
>I sometimes get a compiler error message:
>        Incompatible types: 'xxx' and 'TDataConfig'
>The message is generated for an assignment of a TDataConfig to a
>TDataConfig, which is my own defined type (defined in the same unit).
>I'm sure the assignment is correct.
>Now, I made the following puzzling observations:
>1) 'xxx' is a nonsense strings, e.g. '@#||L.('.
>2) not every compile of the unit generates this message. Often
>   the compiler does not complain at all.
>3) when the error is reported and I select Project/Compile, the error
>   is reported again, but with a different 'xxx'.
>4) when I rebuild the whole project (Project/Build), the compiler
>   never complains and the program runs fine.
>Anyone seen this before and has any hint of where to look? Any help
>is appreciated very much! My Delphi version is 2.00.

If you get a message with garbage in the type-name (allowing for any possible
character-set issues?), then I would consider that to be sufficient reason to
assume it's a bug and to inquire at www.borland.com.

Other Threads