(In reply to Vladimir Panteleev from comment #1)
> This is a regression.
>
> Introduced in
> https://github.com/D-Programming-Language/dmd/commit/
> a04cf864b932061ad7b72e7cad8b16fabc6a825a
Could you please tell me how did you check that? I cannot reproduce the issue because the provided code lacks:
- file name of each modules
- directory tree
- command line
Comment #3 by dlang-bugzilla — 2015-06-10T04:45:11Z
(In reply to Kenji Hara from comment #2)
> Could you please tell me how did you check that? I cannot reproduce the
> issue because the provided code lacks:
> - file name of each modules
> - directory tree
> - command line
I used my psychic powers :)
https://github.com/CyberShadow/DBugTests/tree/master/14666
(Command is "dmd -o- location.d" as per bisect.ini)
Comment #4 by deadalnix — 2015-06-10T05:35:01Z
Sorry for the missing filenames, here they are:
****** d/base/location.d ***********
module d.base.location;
struct Location {
import d.base.name;
}
****** d/base/name.d ***********
auto getNames() {
import d.lexer;
}
enum Names = getNames;
****** d.lexer.d ***********
module d.lexer;
import d.base.location;
struct Token {
Location location;
}
*****************
$ dmd -c d/base/location.d
Comment #8 by github-bugzilla — 2016-03-31T07:05:44Z
Commit pushed to master at https://github.com/D-Programming-Language/dmdhttps://github.com/D-Programming-Language/dmd/commit/711944c56bf50a7e7323cd34008311345e53f57c
Add deferred semantic2 mechanism, and run semantic2 for all imported modules
When a module is only imported from function local scopes, it couldn't get a change to run semantic2 analysis.
It was "fix" for the issue 14666 case, but the deferred instance size finalization collides with that.
Now, function local imports can cause module level mutual forward references. Their resolutions can be deferred until the global level analysis loop in `mars.d` at maximum, and all function local imports will work as same as module level ones.
Comment #9 by github-bugzilla — 2016-10-01T11:45:42Z