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

Mathias Lang <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m
            Summary|undefined indentifiers that |Incorrect error message
                   |should be visible           |depending on import order +
                   |                            |missing LoC information on
                   |                            |generated ctor error

--- Comment #1 from Mathias Lang <[email protected]> ---
Do you know which version are affected ?
It isn't a 2.071 regression, 2.070 exhibit the same behaviour.
It seems to be a bad diagnostic but since reordering the code to the following:

```
import core.thread;
class CoreTask : TaskFiber {}
class TaskFiber : Fiber {}
```

(Note how the import moved to the top)
gives an (almost) proper error message (LoC information is missing):

```
Error: constructor core.thread.Fiber.this is not accessible from module lol
```

Indeed the generated default ctor is trying to call the base class default
ctor, which is private:
https://github.com/dlang/druntime/blob/62e43c5f1ed9fc4491cd89ebca08c9dda2c0abe5/src/core/thread.d#L4263-L4270

Edited the issue title accordingly.

--

Reply via email to