https://issues.dlang.org/show_bug.cgi?id=15925

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #14 from Steven Schveighoffer <[email protected]> ---
The original bug report here, I think has some merit.

If you need to add imports to a class/struct/function in order to allow for
your declaration to make sense, then I don't see a reason why it should be
disallowed.

For instance, the original example imports core.thread, and then declares th of
type Thread. You can use members of th inside Foo, but not declare another
'Thread'. You also could not use any UFCS functions defined in core.thread (if
there are any). This leaves you with a half-working type. As far as I know,
there's no workaround.

(In reply to Walter Bright from comment #5)
> This is not a bug, the behavior is on purpose and as designed. This was
> discussed at length for an analogous case, imports in base classes.

Where is the discussion? I want to add the explanation for this to the blog
post I wrote on the import differences in 2.071, but I can't find any.

--

Reply via email to