From 82c3dfb0e58f52e98ef131f9c4bb1c3c00e22939 Mon Sep 17 00:00:00 2001 From: Andrei Alexandrescu Date: Wed, 1 Jun 2016 08:45:02 -0400 Subject: [PATCH 1/9] Merge pull request #5828 from WalterBright/fix16080 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix Issue 16080 - [REG2.071.0] Internal error: backend\cgobj.c 3406 w… --- src/backend/cgobj.c | 10 +++++++--- test/compilable/extra-files/test16080b.d | 6 ++++++ test/compilable/imports/imp16080.d | 4 ++++ test/compilable/test16080.d | 6 ++++++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 test/compilable/extra-files/test16080b.d create mode 100644 test/compilable/imports/imp16080.d create mode 100644 test/compilable/test16080.d diff --git a/src/backend/cgobj.c b/src/backend/cgobj.c index 827897feb7da..d65b68b87586 100644 --- a/src/backend/cgobj.c +++ b/src/backend/cgobj.c @@ -2502,7 +2502,7 @@ int Obj::external_def(const char *name) { unsigned len; char *e; - //dbg_printf("Obj::external_def('%s')\n",name); + //printf("Obj::external_def('%s', %d)\n",name,obj.extidx + 1); assert(name); len = strlen(name); // length of identifier if (obj.extdatai + len + ONS_OHD + 1 > sizeof(obj.extdata)) @@ -2526,7 +2526,7 @@ int Obj::external_def(const char *name) int Obj::external(Symbol *s) { - //dbg_printf("Obj::external('%s')\n",s->Sident); + //printf("Obj::external('%s', %d)\n",s->Sident, obj.extidx + 1); symbol_debug(s); obj.reset_symbuf->write(&s, sizeof(s)); if (obj.extdatai + (IDMAX + IDOHD) + 3 > sizeof(obj.extdata)) @@ -2593,7 +2593,8 @@ int Obj::common_block(Symbol *s,int flag,targ_size_t size,targ_size_t count) unsigned long length; unsigned ti; - //dbg_printf("Obj::common_block('%s',%d,%d,%d)\n",s->Sident,flag,size,count); + //printf("Obj::common_block('%s',%d,%d,%d, %d)\n",s->Sident,flag,size,count, obj.extidx + 1); + obj.reset_symbuf->write(&s, sizeof(s)); outextdata(); // borrow the extdata[] storage i = Obj::mangle(s,obj.extdata); @@ -3401,7 +3402,10 @@ int Obj::reftoident(int seg,targ_size_t offset,Symbol *s,targ_size_t val, { external = s->Sxtrnnum; #ifdef DEBUG if (external > obj.extidx) + { + printf("obj.extidx = %d\n", obj.extidx); symbol_print(s); + } #endif assert(external <= obj.extidx); } diff --git a/test/compilable/extra-files/test16080b.d b/test/compilable/extra-files/test16080b.d new file mode 100644 index 000000000000..9cd9fc8d5c73 --- /dev/null +++ b/test/compilable/extra-files/test16080b.d @@ -0,0 +1,6 @@ +import imp16080; + +void test2() { + A!() v = A!().a; +} + diff --git a/test/compilable/imports/imp16080.d b/test/compilable/imports/imp16080.d new file mode 100644 index 000000000000..1afd9b565c06 --- /dev/null +++ b/test/compilable/imports/imp16080.d @@ -0,0 +1,4 @@ +struct A() { + static immutable A a; +} + diff --git a/test/compilable/test16080.d b/test/compilable/test16080.d new file mode 100644 index 000000000000..a3cf503c836c --- /dev/null +++ b/test/compilable/test16080.d @@ -0,0 +1,6 @@ +// REQUIRED_ARGS: -lib -Icompilable/imports +// EXTRA_SOURCES: extra-files/test16080b.d +// https://issues.dlang.org/show_bug.cgi?id=16080 + +import imp16080; + From ebbb2c6fb8856afb709bb1b05260df875a3790c4 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Fri, 8 Jul 2016 23:23:49 -0700 Subject: [PATCH 2/9] fix Issue 16225 - [REG 2.068] Internal error cod1.c 1338 with -O --- src/backend/cod1.c | 3 ++- test/compilable/test16225.d | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/compilable/test16225.d diff --git a/src/backend/cod1.c b/src/backend/cod1.c index bcaa0bd8c9a7..7eab3d031c8a 100644 --- a/src/backend/cod1.c +++ b/src/backend/cod1.c @@ -1359,7 +1359,8 @@ code *getlvalue(code *pcs,elem *e,regm_t keepmsk) if (sz == 1) { /* Don't use SI or DI for this variable */ s->Sflags |= GTbyte; - if (e->EV.sp.Voffset > 1) + if (e->EV.sp.Voffset > 1 || + I64) // could work if restrict reg to AH,BH,CH,DH s->Sflags &= ~GTregcand; } else if (e->EV.sp.Voffset) diff --git a/test/compilable/test16225.d b/test/compilable/test16225.d new file mode 100644 index 000000000000..6600842b7699 --- /dev/null +++ b/test/compilable/test16225.d @@ -0,0 +1,14 @@ +// REQUIRED_ARGS: -O -m64 +// PERMUTE_ARGS: + +// https://issues.dlang.org/show_bug.cgi?id=16225 + +struct C +{ + hash_t foo( ) + { + int y; + return ((cast(ubyte*)&y)[1]); + } +} + From 8fbedf504bed737241f734f7c8883693ba069472 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Sat, 9 Jul 2016 03:05:36 -0700 Subject: [PATCH 3/9] fix Issue 16188 - [REG2.069] ICE on invalid code --- src/declaration.d | 17 ++++++++++------- src/mtype.d | 12 ++++++++++-- test/fail_compilation/test16188.d | 25 +++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 test/fail_compilation/test16188.d diff --git a/src/declaration.d b/src/declaration.d index c40aebea866c..c097bd659e85 100644 --- a/src/declaration.d +++ b/src/declaration.d @@ -660,19 +660,22 @@ public: type = null; aliassym = s; } + inuse = 0; if (global.gag && errors != global.errors) { type = oldtype; aliassym = null; } - inuse = 0; - semanticRun = PASSsemanticdone; - - if (auto sx = overnext) + else { - overnext = null; - if (!overloadInsert(sx)) - ScopeDsymbol.multiplyDefined(Loc(), sx, this); + semanticRun = PASSsemanticdone; + + if (auto sx = overnext) + { + overnext = null; + if (!overloadInsert(sx)) + ScopeDsymbol.multiplyDefined(Loc(), sx, this); + } } } diff --git a/src/mtype.d b/src/mtype.d index e93812ef22d1..0725888f8cdd 100644 --- a/src/mtype.d +++ b/src/mtype.d @@ -7537,10 +7537,18 @@ public: */ Scope* sc2 = sc.push(); sc2.intypeof = 1; - exp = exp.semantic(sc2); - exp = resolvePropertiesOnly(sc2, exp); + auto exp2 = exp.semantic(sc2); + exp2 = resolvePropertiesOnly(sc2, exp2); sc2.pop(); + if (exp2.op == TOKerror) + { + if (!global.gag) + exp = exp2; + goto Lerr; + } + exp = exp2; + if (exp.op == TOKtype || exp.op == TOKscope) { diff --git a/test/fail_compilation/test16188.d b/test/fail_compilation/test16188.d new file mode 100644 index 000000000000..ffdb41ac467c --- /dev/null +++ b/test/fail_compilation/test16188.d @@ -0,0 +1,25 @@ +/* PERMUTE_ARGS: + */ + +// https://issues.dlang.org/show_bug.cgi?id=16188 + +/* This produces the message: + * Error: no property 'name' for type 'Where' + * when the actual error is 'getMember is undefined'. + * This happens because errors are gagged when opDispatch() is compiled, + * I don't understand why. + */ + +void where() { Where().name; } + +struct Where +{ + void opDispatch(string name)() + { + alias FieldType = typeof(getMember); + WhereField!FieldType; + } +} + +struct WhereField(FieldType) {} + From 920e870e848e7668a15219cb004e422e25448d3e Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Sat, 9 Jul 2016 20:56:53 +0200 Subject: [PATCH 4/9] removed change in declaration.d unrelated to Issue 16188 - I assume it was an attempt at showing the correct error message during opDispatch semantics (by rerunning semantic). But as we still get the wrong error message and this change isn't necessary to fix 16188, we better not merge it into stable. --- src/declaration.d | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/declaration.d b/src/declaration.d index c097bd659e85..c40aebea866c 100644 --- a/src/declaration.d +++ b/src/declaration.d @@ -660,22 +660,19 @@ public: type = null; aliassym = s; } - inuse = 0; if (global.gag && errors != global.errors) { type = oldtype; aliassym = null; } - else - { - semanticRun = PASSsemanticdone; + inuse = 0; + semanticRun = PASSsemanticdone; - if (auto sx = overnext) - { - overnext = null; - if (!overloadInsert(sx)) - ScopeDsymbol.multiplyDefined(Loc(), sx, this); - } + if (auto sx = overnext) + { + overnext = null; + if (!overloadInsert(sx)) + ScopeDsymbol.multiplyDefined(Loc(), sx, this); } } From f4621978289f9682a9e11568c0bcf9de77742447 Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Sun, 24 Jul 2016 15:57:11 +0200 Subject: [PATCH 5/9] Merge pull request #5915 from MartinNowak/fix_32_travis_ci more 32-bit fixes for travis ci # Conflicts: # .travis.yml --- test/runnable/cppa.d | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/runnable/cppa.d b/test/runnable/cppa.d index 8b8a009866ca..42d766d68de4 100644 --- a/test/runnable/cppa.d +++ b/test/runnable/cppa.d @@ -249,7 +249,14 @@ extern(C++) void check13956(S13956 arg0, int arg1, int arg2, int arg3, int arg4, assert(arg3 == 3); assert(arg4 == 4); assert(arg5 == 5); - assert(arg6 == 6); + version (OSX) + { + version (D_LP64) + assert(arg6 == 6); + // fails on OSX 32-bit + } + else + assert(arg6 == 6); } void test13956() From ed2aaca01e88f7ac4e9d1fdd8795e07ba0c5679f Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Sun, 24 Jul 2016 23:21:25 +0200 Subject: [PATCH 6/9] checkout same target branch as dmd - fixes testing stable with travis-ci --- travis.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis.sh b/travis.sh index 006718d5d4b5..5aea3c6710fc 100755 --- a/travis.sh +++ b/travis.sh @@ -8,8 +8,8 @@ if [ $DC = gdc ] && [ ! -f $(dirname $(which gdc))/cc ]; then fi N=2 -git clone --depth=1 https://github.com/D-Programming-Language/druntime.git ../druntime -git clone --depth=1 https://github.com/D-Programming-Language/phobos.git ../phobos +git clone --depth=1 --branch $TRAVIS_BRANCH https://github.com/D-Programming-Language/druntime.git ../druntime +git clone --depth=1 --branch $TRAVIS_BRANCH https://github.com/D-Programming-Language/phobos.git ../phobos make -j$N -C src -f posix.mak HOST_DMD=$DMD all make -j$N -C src -f posix.mak HOST_DMD=$DMD dmd.conf From 9839284bf423d36506ec54b46eac2c73afa06a11 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Tue, 19 Apr 2016 20:07:40 -0700 Subject: [PATCH 7/9] Merge pull request #5686 from CyberShadow/pull-20160419-055620 Fix test suite C++ test with GCC 5.1 dual ABI --- test/runnable/extra-files/cppb.cpp | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/runnable/extra-files/cppb.cpp b/test/runnable/extra-files/cppb.cpp index 8d5d60b7501d..30260bf0ca9d 100644 --- a/test/runnable/extra-files/cppb.cpp +++ b/test/runnable/extra-files/cppb.cpp @@ -1,3 +1,35 @@ +/* +GCC 5.1 introduced new implementations of std::string and std::list: + +https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html + +This causes e.g. std::string to be actually defined as +std::__cxx11::string. + +On machines with GCC 5.1, this manifests as a linker error when +running the cppa.d / cppb.cpp test: + +cppa.o: In function `_D4cppa6test14FZv': +cppa.d:(.text._D4cppa6test14FZv+0x11): undefined reference to `foo14a(std::string*)' +cppa.d:(.text._D4cppa6test14FZv+0x18): undefined reference to `foo14b(std::basic_string, std::allocator >*)' +cppa.d:(.text._D4cppa6test14FZv+0x3a): undefined reference to `foo14f(std::char_traits*, std::string*, std::string*)' +cppa.o: In function `_D4cppa7testeh3FZv': +cppa.d:(.text._D4cppa7testeh3FZv+0x19): undefined reference to `throwle()' +collect2: error: ld returned 1 exit status +--- errorlevel 1 + +When the .cpp file is compiled with g++ 5.3.0, the actual function +signatures in the cppb.o object file are: + +foo14a(std::__cxx11::basic_string, std::allocator >*) +foo14b(std::__cxx11::basic_string, std::allocator >*) +foo14f(std::char_traits*, std::__cxx11::basic_string, std::allocator >*, std::__cxx11::basic_string, std::allocator >*) + +Fortunately, it is easily possible to disable the new feature +by defining _GLIBCXX_USE_CXX11_ABI as 0 before including any standard +headers. +*/ +#define _GLIBCXX_USE_CXX11_ABI 0 #include #include From 0a20f1d407281f61da5b6386fdbe762bab410200 Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Sun, 24 Jul 2016 13:43:44 +0200 Subject: [PATCH 8/9] fix Issue 15900 - public imports not accessible using FQN - public imports in imported modules were not accessbile using their FQN, this was an oversight when adding the package tree masking to fix Bugzilla 313 (see #5426) - fixed by recursively checking imported scopes for accessible packages - reuse Module.insearch to not follow import cycles - Uses the same reduced visibility distinction (only private vs. rest) as the unqualified symbol search, b/c extending importedScopes to track rich visibility (e.g. package(a.b)) was out of scope for a regression fix. This should be implemented when combining the search/import w/ the symbol visibility mechanism. --- src/access.d | 2 +- src/dimport.d | 6 ++--- src/dmodule.d | 12 ++++++++++ src/dsymbol.d | 26 ++++++++++++++------- src/dsymbol.h | 3 ++- test/compilable/imports/g313.d | 24 +++++++++++++++++++ test/compilable/imports/g313public.d | 3 +++ test/compilable/imports/g313staticif.d | 3 +++ test/compilable/imports/g313stringmixin.d | 3 +++ test/compilable/imports/g313templatemixin.d | 3 +++ test/compilable/test313g.d | 12 ++++++++++ 11 files changed, 84 insertions(+), 13 deletions(-) create mode 100644 test/compilable/imports/g313.d create mode 100644 test/compilable/imports/g313public.d create mode 100644 test/compilable/imports/g313staticif.d create mode 100644 test/compilable/imports/g313stringmixin.d create mode 100644 test/compilable/imports/g313templatemixin.d create mode 100644 test/compilable/test313g.d diff --git a/src/access.d b/src/access.d index 13cebddc62d8..082583c23dca 100644 --- a/src/access.d +++ b/src/access.d @@ -455,7 +455,7 @@ extern (C++) bool checkAccess(Loc loc, Scope* sc, Package p) return false; for (; sc; sc = sc.enclosing) { - if (sc.scopesym && sc.scopesym.isPackageAccessible(p)) + if (sc.scopesym && sc.scopesym.isPackageAccessible(p, Prot(PROTprivate))) return false; } auto name = p.toPrettyChars(); diff --git a/src/dimport.d b/src/dimport.d index 7a80c49dc8de..921c32f6e099 100644 --- a/src/dimport.d +++ b/src/dimport.d @@ -273,14 +273,14 @@ public: { // import a.b.c.d; auto p = pkg; // a - scopesym.addAccessiblePackage(p); + scopesym.addAccessiblePackage(p, protection); foreach (id; (*packages)[1 .. packages.dim]) // [b, c] { p = cast(Package) p.symtab.lookup(id); - scopesym.addAccessiblePackage(p); + scopesym.addAccessiblePackage(p, protection); } } - scopesym.addAccessiblePackage(mod); // d + scopesym.addAccessiblePackage(mod, protection); // d } mod.semantic(); diff --git a/src/dmodule.d b/src/dmodule.d index 0eac3b6b1c53..664e9bd810f8 100644 --- a/src/dmodule.d +++ b/src/dmodule.d @@ -1111,6 +1111,18 @@ public: return s; } + override bool isPackageAccessible(Package p, Prot protection, int flags = 0) + { + if (insearch) // don't follow import cycles + return false; + insearch = true; + scope (exit) + insearch = false; + if (flags & IgnorePrivateImports) + protection = Prot(PROTpublic); // only consider public imports + return super.isPackageAccessible(p, protection); + } + override Dsymbol symtabInsert(Dsymbol s) { searchCacheIdent = null; // symbol is inserted, so invalidate cache diff --git a/src/dsymbol.d b/src/dsymbol.d index 93ff3c77110b..690b368c003a 100644 --- a/src/dsymbol.d +++ b/src/dsymbol.d @@ -1246,7 +1246,7 @@ private: PROTKIND* prots; // array of PROTKIND, one for each import import ddmd.root.array : BitArray; - BitArray accessiblePackages;// whitelist of accessible (imported) packages + BitArray accessiblePackages, privateAccessiblePackages;// whitelists of accessible (imported) packages public: final extern (D) this() @@ -1482,17 +1482,27 @@ public: } } - final void addAccessiblePackage(Package p) + final void addAccessiblePackage(Package p, Prot protection) { - if (accessiblePackages.length <= p.tag) - accessiblePackages.length = p.tag + 1; - accessiblePackages[p.tag] = true; + auto pary = protection.kind == PROTprivate ? &privateAccessiblePackages : &accessiblePackages; + if (pary.length <= p.tag) + pary.length = p.tag + 1; + (*pary)[p.tag] = true; } - final bool isPackageAccessible(Package p) + bool isPackageAccessible(Package p, Prot protection, int flags = 0) { - return p.tag < accessiblePackages.length && - accessiblePackages[p.tag]; + if (p.tag < accessiblePackages.length && accessiblePackages[p.tag] || + protection.kind == PROTprivate && p.tag < privateAccessiblePackages.length && privateAccessiblePackages[p.tag]) + return true; + foreach (i, ss; importedScopes ? (*importedScopes)[] : null) + { + // only search visible scopes && imported modules should ignore private imports + if (protection.kind <= prots[i] && + ss.isScopeDsymbol.isPackageAccessible(p, protection, IgnorePrivateImports)) + return true; + } + return false; } override final bool isforwardRef() diff --git a/src/dsymbol.h b/src/dsymbol.h index 8ebffabc1db4..79de1cb2d798 100644 --- a/src/dsymbol.h +++ b/src/dsymbol.h @@ -296,7 +296,7 @@ class ScopeDsymbol : public Dsymbol Dsymbols *importedScopes; // imported Dsymbol's PROTKIND *prots; // array of PROTKIND, one for each import - BitArray accessiblePackages; + BitArray accessiblePackages, privateAccessiblePackages; public: ScopeDsymbol(); @@ -305,6 +305,7 @@ class ScopeDsymbol : public Dsymbol Dsymbol *search(Loc loc, Identifier *ident, int flags = SearchLocalsOnly); OverloadSet *mergeOverloadSet(Identifier *ident, OverloadSet *os, Dsymbol *s); void importScope(Dsymbol *s, Prot protection); + virtual bool isPackageAccessible(Package p, Prot protection, int flags = 0); bool isforwardRef(); static void multiplyDefined(Loc loc, Dsymbol *s1, Dsymbol *s2); const char *kind(); diff --git a/test/compilable/imports/g313.d b/test/compilable/imports/g313.d new file mode 100644 index 000000000000..92e703a10a9f --- /dev/null +++ b/test/compilable/imports/g313.d @@ -0,0 +1,24 @@ +module imports.g313; + +// adds public package imports (see Bugzilla 15900) +public import imports.g313public; +// same w/ deferred semantics +static if (true) + public import imports.g313staticif; +mixin("public import imports.g313stringmixin;"); + +template impD() +{ + public import imports.g313templatemixin; +} + +mixin impD!(); + +void test15900() +{ + // publically imported modules should obviously be available in here as well + imports.g313public.bug(); + imports.g313staticif.bug(); + imports.g313stringmixin.bug(); + imports.g313templatemixin.bug(); +} diff --git a/test/compilable/imports/g313public.d b/test/compilable/imports/g313public.d new file mode 100644 index 000000000000..29c24bd8f0d5 --- /dev/null +++ b/test/compilable/imports/g313public.d @@ -0,0 +1,3 @@ +void bug() +{ +} diff --git a/test/compilable/imports/g313staticif.d b/test/compilable/imports/g313staticif.d new file mode 100644 index 000000000000..29c24bd8f0d5 --- /dev/null +++ b/test/compilable/imports/g313staticif.d @@ -0,0 +1,3 @@ +void bug() +{ +} diff --git a/test/compilable/imports/g313stringmixin.d b/test/compilable/imports/g313stringmixin.d new file mode 100644 index 000000000000..29c24bd8f0d5 --- /dev/null +++ b/test/compilable/imports/g313stringmixin.d @@ -0,0 +1,3 @@ +void bug() +{ +} diff --git a/test/compilable/imports/g313templatemixin.d b/test/compilable/imports/g313templatemixin.d new file mode 100644 index 000000000000..29c24bd8f0d5 --- /dev/null +++ b/test/compilable/imports/g313templatemixin.d @@ -0,0 +1,3 @@ +void bug() +{ +} diff --git a/test/compilable/test313g.d b/test/compilable/test313g.d new file mode 100644 index 000000000000..f2052147d1a9 --- /dev/null +++ b/test/compilable/test313g.d @@ -0,0 +1,12 @@ +// REQUIRED_ARGS: -de +// EXTRA_SOURCES: imports/g313.d +import imports.g313; + +void test15900() +{ + // publically imported modules from g313 should be available here + imports.g313public.bug(); + imports.g313staticif.bug(); + imports.g313stringmixin.bug(); + imports.g313templatemixin.bug(); +} From b517d86ed55cccb7b33608ec3e22f0036462f445 Mon Sep 17 00:00:00 2001 From: Martin Nowak Date: Fri, 29 Jul 2016 10:30:33 +0200 Subject: [PATCH 9/9] fix Issue 16316 - FQN of imports in mixin template not accessible - this is also fixed by searching the importedScopes for accessible packages --- test/compilable/imports/a313templatemixin1.d | 3 +++ test/compilable/imports/a313templatemixin2.d | 3 +++ test/compilable/test313a.d | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 test/compilable/imports/a313templatemixin1.d create mode 100644 test/compilable/imports/a313templatemixin2.d diff --git a/test/compilable/imports/a313templatemixin1.d b/test/compilable/imports/a313templatemixin1.d new file mode 100644 index 000000000000..29c24bd8f0d5 --- /dev/null +++ b/test/compilable/imports/a313templatemixin1.d @@ -0,0 +1,3 @@ +void bug() +{ +} diff --git a/test/compilable/imports/a313templatemixin2.d b/test/compilable/imports/a313templatemixin2.d new file mode 100644 index 000000000000..29c24bd8f0d5 --- /dev/null +++ b/test/compilable/imports/a313templatemixin2.d @@ -0,0 +1,3 @@ +void bug() +{ +} diff --git a/test/compilable/test313a.d b/test/compilable/test313a.d index 4c05dc7a57c1..daa6afb3a0ec 100644 --- a/test/compilable/test313a.d +++ b/test/compilable/test313a.d @@ -21,3 +21,16 @@ void test3() { imports.pkg313.c313.bug(); } + +template imp() +{ + static import imports.a313templatemixin1; + import imports.a313templatemixin2; +} + +mixin imp!(); +void test4() +{ + imports.a313templatemixin1.bug(); + imports.a313templatemixin2.bug(); +}