compiler message cannot convert GType to GType
Unknown W. Brackets
unknown at simplemachines.org
Sun Mar 12 20:06:29 PST 2006
Actually, I think I saw this once... or twice. It was a dumb mistake of
mine, though. It requires multiple files.
File #1, test1.d:
---
import test2;
typedef int test;
void main()
{
test1.test x = 5;
foo(x);
}
void foo(test2.test y)
{
}
---
File #2, test2.d:
---
typedef int test;
---
But that's not this problem. I think this one is:
File #3, test3.d:
---
import test2;
typedef int test;
void main()
{
test3.test x = 5;
test2.test y = x;
}
---
Which produces the same error message. In actuality, the compiler is
100% correct - the two cannot be implicitly cast. However, the error
message is VERY ambiguous.
As you can tell, the root of the problem is that the error message
doesn't use fully-qualified type names. Personally, I like this better,
but maybe at least for these sort of cases, they need to be fully-qualified.
Ant, do you think this is the issue you are running into?
Thanks,
-[Unknown]
> You should strive to get a file that's at max, 10's of lines of code and
> requires no imported modules. If you don't, then someone else will have
> to. Waiting for Walter to do it for you pretty much means it isn't going
> to happen. There's pleanty of already reduced cases that are going to get
> looked at first simply because they're far easier to make progress on.
More information about the Digitalmars-d-bugs
mailing list