[Issue 21500] New: public import in mixin template in module a fails when module b import sa.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 23 05:42:39 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21500
Issue ID: 21500
Summary: public import in mixin template in module a fails when
module b import sa.
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: noobnoobsai at gmail.com
Is this supposed to work?
```bar.d
mixin template baz() {
public import std.stdio;
// public import std.stdio : writeln;
}
}
```
```foo.d
import bar;
mixin baz; //
void main(){
// foo.d(8): Error: writeln is not defined, perhaps import std.stdio; is
needed?
writeln("foo"); // public import statement in mixin fails
}
```
--
More information about the Digitalmars-d-bugs
mailing list