[Issue 18219] New: Private import inside struct leaks symbols when used as VarDeclaration types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 10 08:40:29 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18219
Issue ID: 18219
Summary: Private import inside struct leaks symbols when used
as VarDeclaration types
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: razvan.nitu1305 at gmail.com
// a.d
class Foobar
{
int a;
this(int a)
{
this.a = a;
}
static int smeth()
{
return 1;
}
}
void fun() {}
// b.d
struct AST
{
import a;
}
// c.d
void main()
{
import b;
AST.Foobar t; // compiles
AST.Foobar.smeth(); // does not compile
AST.fun(); // does not compile
}
`AST.Foobar t` should not compile.
--
More information about the Digitalmars-d-bugs
mailing list