Best error msg ever

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 10 12:32:19 PST 2017


On 2/10/2017 4:41 AM, Nemanja Boric wrote:
> I saw it happen with D as well: everything compiles, everything is
> fine, and suddenly segfault. The issue was caused by template argument, two
> modules with the same name, but from different packages (think
> `myalib.blah.morebla.foo` and `myblib.blah.morebla.foo`) and a cast
> somewhere in the middle of the callstack which casted the first template
> argument to the second one, where the `myalib`'s foo was casted to `myblib`'s
> interface.

That's why such casts are not allowed in @safe code.



More information about the Digitalmars-d mailing list