d: Remove visibility and lookup deprecation
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 11 Jan 2021 09:53:18 +0000 (10:53 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Mon, 11 Jan 2021 11:21:03 +0000 (12:21 +0100)
The deprecation phase for access checks is finished.

The `-ftransition=import` and `-ftransition=checkimports` switches no
longer have an effect and are now removed.  Symbols that are not visible
in a particular scope will no longer be found by the compiler.

Reviewed-on: https://github.com/dlang/dmd/pull/12124

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd 2d3d13748.
* d-lang.cc (d_handle_option): Remove OPT_ftransition_checkimports and
OPT_ftransition_import.
* gdc.texi (Warnings): Remove documentation for -ftransition=import
and -ftransition=checkimports.
* lang.opt (ftransition=checkimports): Remove.
(ftransition=import): Remove.

75 files changed:
gcc/d/d-lang.cc
gcc/d/dmd/MERGE
gcc/d/dmd/access.c
gcc/d/dmd/dscope.c
gcc/d/dmd/dsymbol.c
gcc/d/dmd/expression.c
gcc/d/dmd/expression.h
gcc/d/dmd/expressionsem.c
gcc/d/dmd/globals.h
gcc/d/dmd/mtype.c
gcc/d/dmd/parse.c
gcc/d/dmd/scope.h
gcc/d/dmd/traits.c
gcc/d/gdc.texi
gcc/d/lang.opt
gcc/testsuite/gdc.test/compilable/checkimports3.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/ddoc14633.d
gcc/testsuite/gdc.test/compilable/deprecate14283.d
gcc/testsuite/gdc.test/compilable/diag11066.d
gcc/testsuite/gdc.test/compilable/diag12598.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/diag3243.d
gcc/testsuite/gdc.test/compilable/dip22d.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/checkimports3a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/checkimports3b.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/checkimports3c.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/diag12598a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/dip22d.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/dip22e.d [new file with mode: 0644]
gcc/testsuite/gdc.test/compilable/imports/imp15925.d [deleted file]
gcc/testsuite/gdc.test/compilable/test12567a.d
gcc/testsuite/gdc.test/compilable/test12567b.d
gcc/testsuite/gdc.test/compilable/test12567d.d
gcc/testsuite/gdc.test/compilable/test12567e.d
gcc/testsuite/gdc.test/compilable/test13053.d
gcc/testsuite/gdc.test/compilable/test14375.d
gcc/testsuite/gdc.test/compilable/test15785.d
gcc/testsuite/gdc.test/compilable/test15856.d
gcc/testsuite/gdc.test/compilable/test15925.d [deleted file]
gcc/testsuite/gdc.test/compilable/test17791.d
gcc/testsuite/gdc.test/compilable/test7815.d
gcc/testsuite/gdc.test/compilable/testcheckimports.d
gcc/testsuite/gdc.test/compilable/warn3882.d
gcc/testsuite/gdc.test/fail_compilation/checkimports1a.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/checkimports1b.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/checkimports1c.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/checkimports2a.d
gcc/testsuite/gdc.test/fail_compilation/checkimports2b.d
gcc/testsuite/gdc.test/fail_compilation/checkimports2c.d
gcc/testsuite/gdc.test/fail_compilation/checkimports3.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/diag10169.d
gcc/testsuite/gdc.test/fail_compilation/diag12598.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/diag5385.d
gcc/testsuite/gdc.test/fail_compilation/dip22a.d
gcc/testsuite/gdc.test/fail_compilation/dip22b.d
gcc/testsuite/gdc.test/fail_compilation/dip22d.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/dip22e.d
gcc/testsuite/gdc.test/fail_compilation/fail10528.d
gcc/testsuite/gdc.test/fail_compilation/fail262.d
gcc/testsuite/gdc.test/fail_compilation/fail313.d
gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3a.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3b.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3c.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/imports/diag12598a.d [deleted file]
gcc/testsuite/gdc.test/fail_compilation/imports/imp15925.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/imp21353.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/imports/test15117a.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/lookup.d
gcc/testsuite/gdc.test/fail_compilation/test143.d
gcc/testsuite/gdc.test/fail_compilation/test15117.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/test15785.d
gcc/testsuite/gdc.test/fail_compilation/test15785b.d
gcc/testsuite/gdc.test/fail_compilation/test15897.d
gcc/testsuite/gdc.test/fail_compilation/test15925.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/test21353.d [new file with mode: 0644]
gcc/testsuite/gdc.test/fail_compilation/test314.d

index 7b3420971dba409de92bd8f00bad159ada655875..72dcb71698778cc34943b1f89dfbffba98214520 100644 (file)
@@ -551,10 +551,6 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
       global.params.vcomplex = value;
       break;
 
-    case OPT_ftransition_checkimports:
-      global.params.check10378 = value;
-      break;
-
     case OPT_ftransition_complex:
       global.params.vcomplex = value;
       break;
@@ -572,10 +568,6 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
       global.params.vfield = value;
       break;
 
-    case OPT_ftransition_import:
-      global.params.bug10378 = value;
-      break;
-
     case OPT_ftransition_nogc:
       global.params.vgc = value;
       break;
index 435bf31e8b08cffb087093d71af6cf34d5f7e376..4f7f7a8ff3b8ec384362c8cae25ae24acdc2e546 100644 (file)
@@ -1,4 +1,4 @@
-cb1106ad5bea4293cd302b0ba1f3ce08905d40fe
+2d3d137489f030395d06cb664087fd1a35bccabe
 
 The first line of this file holds the git revision number of the last
 merge done from the dlang/dmd repository.
index 1a7238a31cc91289b8cfa75dfa743a14a99db0ca..63f46c60f63273f9c36fd7421528e4453c9c6956 100644 (file)
@@ -342,16 +342,9 @@ bool checkAccess(Loc loc, Scope *sc, Expression *e, Declaration *d)
         return false;
     }
     if (!e)
-    {
-        if ((d->prot().kind == Prot::private_ && d->getAccessModule() != sc->_module) ||
-            (d->prot().kind == Prot::package_ && !hasPackageAccess(sc, d)))
-        {
-            error(loc, "%s %s is not accessible from module %s",
-                d->kind(), d->toPrettyChars(), sc->_module->toChars());
-            return true;
-        }
-    }
-    else if (e->type->ty == Tclass)
+        return false;
+
+    if (e->type->ty == Tclass)
     {
         // Do access check
         ClassDeclaration *cd = (ClassDeclaration *)(((TypeClass *)e->type)->sym);
@@ -386,7 +379,7 @@ bool checkAccess(Loc loc, Scope *sc, Expression *e, Declaration *d)
  * (see Bugzilla 313).
  *
  */
-bool checkAccess(Loc loc, Scope *sc, Package *p)
+bool checkAccess(Scope *sc, Package *p)
 {
     if (sc->_module == p)
         return false;
@@ -395,11 +388,7 @@ bool checkAccess(Loc loc, Scope *sc, Package *p)
         if (sc->scopesym && sc->scopesym->isPackageAccessible(p, Prot(Prot::private_)))
             return false;
     }
-    const char *name = p->toPrettyChars();
-    if (p->isPkgMod == PKGmodule || p->isModule())
-        deprecation(loc, "%s %s is not accessible here, perhaps add 'static import %s;'", p->kind(), name, name);
-    else
-        deprecation(loc, "%s %s is not accessible here", p->kind(), name);
+
     return true;
 }
 
index 32caf7d24097dd3e24acabca75e4f4dccf5b248e..72dc0893af59b1e8e14cd1efcd526979e809db16 100644 (file)
@@ -453,47 +453,12 @@ Dsymbol *Scope::search(Loc loc, Identifier *ident, Dsymbol **pscopesym, int flag
     if (this->flags & SCOPEignoresymbolvisibility)
         flags |= IgnoreSymbolVisibility;
 
-    Dsymbol *sold = NULL;
-    if (global.params.bug10378 || global.params.check10378)
-    {
-        sold = searchScopes(this, loc, ident, pscopesym, flags | IgnoreSymbolVisibility);
-        if (!global.params.check10378)
-            return sold;
-
-        if (ident == Id::dollar) // Bugzilla 15825
-            return sold;
-
-        // Search both ways
-    }
-
     // First look in local scopes
     Dsymbol *s = searchScopes(this, loc, ident, pscopesym, flags | SearchLocalsOnly);
     if (!s)
     {
         // Second look in imported modules
         s = searchScopes(this, loc, ident, pscopesym, flags | SearchImportsOnly);
-        /** Still find private symbols, so that symbols that weren't access
-         * checked by the compiler remain usable.  Once the deprecation is over,
-         * this should be moved to search_correct instead.
-         */
-        if (!s && !(flags & IgnoreSymbolVisibility))
-        {
-            s = searchScopes(this, loc, ident, pscopesym, flags | SearchLocalsOnly | IgnoreSymbolVisibility);
-            if (!s)
-                s = searchScopes(this, loc, ident, pscopesym, flags | SearchImportsOnly | IgnoreSymbolVisibility);
-
-            if (s && !(flags & IgnoreErrors))
-                ::deprecation(loc, "%s is not visible from module %s", s->toPrettyChars(), _module->toChars());
-        }
-    }
-
-    if (global.params.check10378)
-    {
-        Dsymbol *snew = s;
-        if (sold != snew)
-            deprecation10378(loc, sold, snew);
-        if (global.params.bug10378)
-            s = sold;
     }
     return s;
 }
@@ -607,7 +572,7 @@ structalign_t Scope::alignment()
  * one with a close spelling.
  */
 
-void *scope_search_fp(void *arg, const char *seed, int* cost)
+static void *scope_search_fp(void *arg, const char *seed, int* cost)
 {
     //printf("scope_search_fp('%s')\n", seed);
 
@@ -640,45 +605,15 @@ void *scope_search_fp(void *arg, const char *seed, int* cost)
     return (void*)s;
 }
 
-void Scope::deprecation10378(Loc loc, Dsymbol *sold, Dsymbol *snew)
-{
-    // Bugzilla 15857
-    //
-    // The overloadset found via the new lookup rules is either
-    // equal or a subset of the overloadset found via the old
-    // lookup rules, so it suffices to compare the dimension to
-    // check for equality.
-    OverloadSet *osold = NULL;
-    OverloadSet *osnew = NULL;
-    if (sold && (osold = sold->isOverloadSet()) != NULL &&
-        snew && (osnew = snew->isOverloadSet()) != NULL &&
-        osold->a.length == osnew->a.length)
-        return;
-
-    OutBuffer buf;
-    buf.writestring("local import search method found ");
-    if (osold)
-        buf.printf("%s %s (%d overloads)", sold->kind(), sold->toPrettyChars(), (int)osold->a.length);
-    else if (sold)
-        buf.printf("%s %s", sold->kind(), sold->toPrettyChars());
-    else
-        buf.writestring("nothing");
-    buf.writestring(" instead of ");
-    if (osnew)
-        buf.printf("%s %s (%d overloads)", snew->kind(), snew->toPrettyChars(), (int)osnew->a.length);
-    else if (snew)
-        buf.printf("%s %s", snew->kind(), snew->toPrettyChars());
-    else
-        buf.writestring("nothing");
-
-    deprecation(loc, "%s", buf.peekChars());
-}
-
 Dsymbol *Scope::search_correct(Identifier *ident)
 {
     if (global.gag)
         return NULL;            // don't do it for speculative compiles; too time consuming
 
+    Dsymbol *scopesym = NULL;
+    // search for exact name first
+    if (Dsymbol *s = search(Loc(), ident, &scopesym, IgnoreErrors))
+        return s;
     return (Dsymbol *)speller(ident->toChars(), &scope_search_fp, this, idchars);
 }
 
index 5b4fad4ebb7f2afe17d5cb7d15fb282859a39622..293484cae601b9185a299df6b8acecb9bc31cb29 100644 (file)
@@ -531,7 +531,9 @@ Dsymbol *Dsymbol::search_correct(Identifier *ident)
 {
     if (global.gag)
         return NULL;            // don't do it for speculative compiles; too time consuming
-
+    // search for exact name first
+    if (Dsymbol *s = search(Loc(), ident, IgnoreErrors))
+        return s;
     return (Dsymbol *)speller(ident->toChars(), &symbol_search_fp, (void *)this, idchars);
 }
 
@@ -1094,7 +1096,7 @@ Dsymbol *ScopeDsymbol::search(const Loc &loc, Identifier *ident, int flags)
             if ((flags & IgnorePrivateImports) && prots[i] == Prot::private_)
                 continue;
 
-            int sflags = flags & (IgnoreErrors | IgnoreAmbiguous | IgnoreSymbolVisibility); // remember these in recursive searches
+            int sflags = flags & (IgnoreErrors | IgnoreAmbiguous); // remember these in recursive searches
             Dsymbol *ss = (*importedScopes)[i];
 
             //printf("\tscanning import '%s', prots = %d, isModule = %p, isImport = %p\n", ss->toChars(), prots[i], ss->isModule(), ss->isImport());
@@ -1108,9 +1110,7 @@ Dsymbol *ScopeDsymbol::search(const Loc &loc, Identifier *ident, int flags)
             {
                 if (flags & SearchImportsOnly)
                     continue;
-                // compatibility with -transition=import (Bugzilla 15925)
-                // SearchLocalsOnly should always get set for new lookup rules
-                sflags |= (flags & SearchLocalsOnly);
+                sflags |= SearchLocalsOnly;
             }
 
             /* Don't find private members if ss is a module
@@ -1190,19 +1190,6 @@ Dsymbol *ScopeDsymbol::search(const Loc &loc, Identifier *ident, int flags)
                     a = mergeOverloadSet(ident, a, s);
                 s = a;
             }
-
-            // TODO: remove once private symbol visibility has been deprecated
-            if (!(flags & IgnoreErrors) && s->prot().kind == Prot::private_ &&
-                !s->isOverloadable() && !s->parent->isTemplateMixin() && !s->parent->isNspace())
-            {
-                AliasDeclaration *ad;
-                // accessing private selective and renamed imports is
-                // deprecated by restricting the symbol visibility
-                if (s->isImport() || ((ad = s->isAliasDeclaration()) != NULL && ad->_import != NULL))
-                {}
-                else
-                    error(loc, "%s %s is private", s->kind(), s->toPrettyChars());
-            }
             //printf("\tfound in imports %s.%s\n", toChars(), s.toChars());
             return s;
         }
index 395dc56748cf35cddcaf4cb8a9e5eab2e31a6703..3314d0c096c3222022b5533ec18c2bf02056eb98 100644 (file)
@@ -677,7 +677,7 @@ static Dsymbol *searchScopes(Scope *sc, Loc loc, Identifier *ident, int flags)
  * Find symbol in accordance with the UFCS name look up rule
  */
 
-Expression *searchUFCS(Scope *sc, UnaExp *ue, Identifier *ident)
+static Expression *searchUFCS(Scope *sc, UnaExp *ue, Identifier *ident)
 {
     //printf("searchUFCS(ident = %s)\n", ident->toChars());
     Loc loc = ue->loc;
@@ -687,46 +687,13 @@ Expression *searchUFCS(Scope *sc, UnaExp *ue, Identifier *ident)
     if (sc->flags & SCOPEignoresymbolvisibility)
         flags |= IgnoreSymbolVisibility;
 
-    Dsymbol *sold = NULL;
-    if (global.params.bug10378 || global.params.check10378)
-    {
-        sold = searchScopes(sc, loc, ident, flags | IgnoreSymbolVisibility);
-        if (!global.params.check10378)
-        {
-            s = sold;
-            goto Lsearchdone;
-        }
-    }
-
     // First look in local scopes
     s = searchScopes(sc, loc, ident, flags | SearchLocalsOnly);
     if (!s)
     {
         // Second look in imported modules
         s = searchScopes(sc, loc, ident, flags | SearchImportsOnly);
-
-        /** Still find private symbols, so that symbols that weren't access
-         * checked by the compiler remain usable.  Once the deprecation is over,
-         * this should be moved to search_correct instead.
-         */
-        if (!s && !(flags & IgnoreSymbolVisibility))
-        {
-            s = searchScopes(sc, loc, ident, flags | SearchLocalsOnly | IgnoreSymbolVisibility);
-            if (!s)
-                s = searchScopes(sc, loc, ident, flags | SearchImportsOnly | IgnoreSymbolVisibility);
-            if (s)
-                ::deprecation(loc, "%s is not visible from module %s", s->toPrettyChars(), sc->_module->toChars());
-        }
-    }
-    if (global.params.check10378)
-    {
-        Dsymbol *snew = s;
-        if (sold != snew)
-            Scope::deprecation10378(loc, sold, snew);
-        if (global.params.bug10378)
-            s = sold;
     }
-Lsearchdone:
 
     if (!s)
         return ue->e1->type->Type::getProperty(loc, ident, 0);
index d84878f0d6ebfed66b39b7ef8252c76d69fd9f16..15a4d8770c65e894047763ebf51c24f1ef15a522 100644 (file)
@@ -58,7 +58,7 @@ struct Symbol;          // back end symbol
 Expression *resolveProperties(Scope *sc, Expression *e);
 Expression *resolvePropertiesOnly(Scope *sc, Expression *e1);
 bool checkAccess(Loc loc, Scope *sc, Expression *e, Declaration *d);
-bool checkAccess(Loc loc, Scope *sc, Package *p);
+bool checkAccess(Scope *sc, Package *p);
 Expression *build_overload(Loc loc, Scope *sc, Expression *ethis, Expression *earg, Dsymbol *d);
 Dsymbol *search_function(ScopeDsymbol *ad, Identifier *funcid);
 void expandTuples(Expressions *exps);
index ecafd9d20662002ac8954f10a269497f8418294f..a4ff0b41c430abdd3f9c726e016698d698342584 100644 (file)
@@ -43,6 +43,7 @@ bool checkAccess(AggregateDeclaration *ad, Loc loc, Scope *sc, Dsymbol *smember)
 bool checkNestedRef(Dsymbol *s, Dsymbol *p);
 bool checkFrameAccess(Loc loc, Scope *sc, AggregateDeclaration *ad, size_t istart = 0);
 bool symbolIsVisible(Module *mod, Dsymbol *s);
+bool symbolIsVisible(Scope *sc, Dsymbol *s);
 VarDeclaration *copyToTemp(StorageClass stc, const char *name, Expression *e);
 Expression *extractSideEffect(Scope *sc, const char *name, Expression **e0, Expression *e, bool alwaysCopy = false);
 Type *getTypeInfoType(Loc loc, Type *t, Scope *sc);
@@ -331,7 +332,7 @@ public:
             /* See if the symbol was a member of an enclosing 'with'
             */
             WithScopeSymbol *withsym = scopesym->isWithScopeSymbol();
-            if (withsym && withsym->withstate->wthis)
+            if (withsym && withsym->withstate->wthis && symbolIsVisible(sc, s))
             {
                 /* Disallow shadowing
                 */
@@ -368,9 +369,20 @@ public:
             {
                 if (withsym)
                 {
-                    Declaration *d = s->isDeclaration();
-                    if (d)
-                        checkAccess(exp->loc, sc, NULL, d);
+                    if (withsym->withstate->exp->type->ty != Tvoid)
+                    {
+                        // with (exp)' is a type expression
+                        // or 's' is not visible there (for error message)
+                        e = new TypeExp(exp->loc, withsym->withstate->exp->type);
+                    }
+                    else
+                    {
+                        // 'with (exp)' is a Package/Module
+                        e = withsym->withstate->exp;
+                    }
+                    e = new DotIdExp(exp->loc, e, exp->ident);
+                    result = semantic(e, sc);
+                    return;
                 }
 
                 /* If f is really a function template,
@@ -8374,17 +8386,18 @@ Expression *semanticY(DotIdExp *exp, Scope *sc, int flag)
          */
         if (s && !(sc->flags & SCOPEignoresymbolvisibility) && !symbolIsVisible(sc->_module, s))
         {
-            if (s->isDeclaration())
-                ::error(exp->loc, "%s is not visible from module %s", s->toPrettyChars(), sc->_module->toChars());
-            else
-                ::deprecation(exp->loc, "%s is not visible from module %s", s->toPrettyChars(), sc->_module->toChars());
-            // s = NULL
+            s = NULL;
+        }
+        if (s)
+        {
+            Package *p = s->isPackage();
+            if (p && checkAccess(sc, p))
+            {
+                s = NULL;
+            }
         }
         if (s)
         {
-            if (Package *p = s->isPackage())
-                checkAccess(exp->loc, sc, p);
-
             // if 's' is a tuple variable, the tuple is returned.
             s = s->toAlias();
 
@@ -8555,8 +8568,14 @@ Expression *semanticY(DotIdExp *exp, Scope *sc, int flag)
             return NULL;
         s = ie->sds->search_correct(exp->ident);
         if (s)
-            exp->error("undefined identifier '%s' in %s '%s', did you mean %s '%s'?",
-                       exp->ident->toChars(), ie->sds->kind(), ie->sds->toPrettyChars(), s->kind(), s->toChars());
+        {
+            if (s->isPackage())
+                exp->error("undefined identifier `%s` in %s `%s`, perhaps add `static import %s;`",
+                    exp->ident->toChars(), ie->sds->kind(), ie->sds->toPrettyChars(), s->toPrettyChars());
+            else
+                exp->error("undefined identifier '%s' in %s '%s', did you mean %s '%s'?",
+                    exp->ident->toChars(), ie->sds->kind(), ie->sds->toPrettyChars(), s->kind(), s->toChars());
+        }
         else
             exp->error("undefined identifier '%s' in %s '%s'",
                        exp->ident->toChars(), ie->sds->kind(), ie->sds->toPrettyChars());
index 502bae29c48484546c0c54dc9440edf7f94297cd..6e65d86eb5a3b5e8365258a7e616b641a2c674b4 100644 (file)
@@ -126,8 +126,6 @@ struct Param
     bool betterC;       // be a "better C" compiler; no dependency on D runtime
     bool addMain;       // add a default main() function
     bool allInst;       // generate code for all template instantiations
-    bool check10378;    // check for issues transitioning to 10738
-    bool bug10378;      // use pre-bugzilla 10378 search strategy
     bool vsafe;         // use enhanced @safe checking
     unsigned cplusplus;     // version of C++ name mangling to support
     bool showGaggedErrors;  // print gagged errors anyway
index ceee70ac7c3900842bcbf2f72fb373487bf70903..cc8eb226019972fb1fa4bf6ff03aef2a11d151a9 100644 (file)
@@ -6996,8 +6996,8 @@ void TypeQualified::resolveHelper(Loc loc, Scope *sc,
             Dsymbol *sm = s->searchX(loc, sc, id);
             if (sm && !(sc->flags & SCOPEignoresymbolvisibility) && !symbolIsVisible(sc, sm))
             {
-                ::deprecation(loc, "%s is not visible from module %s", sm->toPrettyChars(), sc->_module->toChars());
-                // sm = NULL;
+                ::error(loc, "`%s` is not visible from module `%s`", sm->toPrettyChars(), sc->_module->toChars());
+                sm = NULL;
             }
             if (global.errors != errorsave)
             {
@@ -7965,29 +7965,6 @@ Dsymbol *TypeStruct::toDsymbol(Scope *)
     return sym;
 }
 
-static Dsymbol *searchSymStruct(Scope *sc, Dsymbol *sym, Expression *e, Identifier *ident)
-{
-    int flags = sc->flags & SCOPEignoresymbolvisibility ? IgnoreSymbolVisibility : 0;
-    Dsymbol *sold = NULL;
-    if (global.params.bug10378 || global.params.check10378)
-    {
-        sold = sym->search(e->loc, ident, flags);
-        if (!global.params.check10378)
-            return sold;
-    }
-
-    Dsymbol *s = sym->search(e->loc, ident, flags | SearchLocalsOnly);
-    if (global.params.check10378)
-    {
-        Dsymbol *snew = s;
-        if (sold != snew)
-            Scope::deprecation10378(e->loc, sold, snew);
-        if (global.params.bug10378)
-            s = sold;
-    }
-    return s;
-}
-
 Expression *TypeStruct::dotExp(Scope *sc, Expression *e, Identifier *ident, int flag)
 {
     Dsymbol *s;
@@ -8038,7 +8015,8 @@ Expression *TypeStruct::dotExp(Scope *sc, Expression *e, Identifier *ident, int
         return e;
     }
 
-    s = searchSymStruct(sc, sym, e, ident);
+    const int flags = sc->flags & SCOPEignoresymbolvisibility ? IgnoreSymbolVisibility : 0;
+    s = sym->search(e->loc, ident, flags | IgnorePrivateImports);
 L1:
     if (!s)
     {
@@ -8046,8 +8024,7 @@ L1:
     }
     if (!(sc->flags & SCOPEignoresymbolvisibility) && !symbolIsVisible(sc, s))
     {
-        ::deprecation(e->loc, "%s is not visible from module %s", s->toPrettyChars(), sc->_module->toPrettyChars());
-        // return noMember(sc, e, ident, flag);
+        return noMember(sc, e, ident, flag);
     }
     if (!s->isFuncDeclaration())        // because of overloading
     {
@@ -8524,35 +8501,6 @@ Dsymbol *TypeClass::toDsymbol(Scope *)
     return sym;
 }
 
-static Dsymbol *searchSymClass(Scope *sc, Dsymbol *sym, Expression *e, Identifier *ident)
-{
-    int flags = sc->flags & SCOPEignoresymbolvisibility ? IgnoreSymbolVisibility : 0;
-    Dsymbol *sold = NULL;
-    if (global.params.bug10378 || global.params.check10378)
-    {
-        sold = sym->search(e->loc, ident, flags | IgnoreSymbolVisibility);
-        if (!global.params.check10378)
-            return sold;
-    }
-
-    Dsymbol *s = sym->search(e->loc, ident, flags | SearchLocalsOnly);
-    if (!s && !(flags & IgnoreSymbolVisibility))
-    {
-        s = sym->search(e->loc, ident, flags | SearchLocalsOnly | IgnoreSymbolVisibility);
-        if (s && !(flags & IgnoreErrors))
-            ::deprecation(e->loc, "%s is not visible from class %s", s->toPrettyChars(), sym->toChars());
-    }
-    if (global.params.check10378)
-    {
-        Dsymbol *snew = s;
-        if (sold != snew)
-            Scope::deprecation10378(e->loc, sold, snew);
-        if (global.params.bug10378)
-            s = sold;
-    }
-    return s;
-}
-
 Expression *TypeClass::dotExp(Scope *sc, Expression *e, Identifier *ident, int flag)
 {
     Dsymbol *s;
@@ -8606,7 +8554,9 @@ Expression *TypeClass::dotExp(Scope *sc, Expression *e, Identifier *ident, int f
         return e;
     }
 
-    s = searchSymClass(sc, sym, e, ident);
+    int flags = sc->flags & SCOPEignoresymbolvisibility ? IgnoreSymbolVisibility : 0;
+    s = sym->search(e->loc, ident, flags | IgnorePrivateImports);
+
 L1:
     if (!s)
     {
@@ -8754,8 +8704,7 @@ L1:
     }
     if (!(sc->flags & SCOPEignoresymbolvisibility) && !symbolIsVisible(sc, s))
     {
-        ::deprecation(e->loc, "%s is not visible from module %s", s->toPrettyChars(), sc->_module->toPrettyChars());
-        // return noMember(sc, e, ident, flag);
+        return noMember(sc, e, ident, flag);
     }
     if (!s->isFuncDeclaration())        // because of overloading
     {
index 2664af2e706896726b58f5bdc253c3dcf0dccc67..bae3448b90e56c1ff5fe2936e58858fb12cdd400 100644 (file)
@@ -644,7 +644,6 @@ Dsymbols *Parser::parseDeclDefs(int once, Dsymbol **pLastDecl, PrefixAttributes
 
             case TOKdeprecated:
             {
-                Expression *e = NULL;
                 if (StorageClass _stc = parseDeprecatedAttribute(this, &pAttrs->depmsg))
                 {
                     stc = _stc;
index b22823fb84672ec11f4983d94c10226065247986..7e1b634caca33caf23b6db9506753f8770efbeb4 100644 (file)
@@ -144,7 +144,6 @@ struct Scope
     Module *instantiatingModule();
 
     Dsymbol *search(Loc loc, Identifier *ident, Dsymbol **pscopesym, int flags = IgnoreNone);
-    static void deprecation10378(Loc loc, Dsymbol *sold, Dsymbol *snew);
     Dsymbol *search_correct(Identifier *ident);
     static const char *search_correct_C(Identifier *ident);
     Dsymbol *insert(Dsymbol *s);
index 46b7d9686214e4502ded5f557214f3d294bc437c..5fd4b486a9bd94483fc7e0ace9903b3b4dd7eaad 100644 (file)
@@ -933,7 +933,7 @@ Expression *semanticTraits(TraitsExp *e, Scope *sc)
             return dimError(e, 1, dim);
 
         Scope *sc2 = sc->push();
-        sc2->flags = sc->flags | SCOPEnoaccesscheck;
+        sc2->flags = sc->flags | SCOPEnoaccesscheck | SCOPEignoresymbolvisibility;
         bool ok = TemplateInstance::semanticTiargs(e->loc, sc2, e->args, 1);
         sc2->pop();
         if (!ok)
index 7f4906d72bbe77b1e687b92bc7063373bb084eb3..e727848895db5224e0b6211bb5aabc13d905a315 100644 (file)
@@ -634,8 +634,6 @@ Report additional information about D language changes identified by
 @table @samp
 @item all
 List information on all language changes.
-@item checkimports
-Give deprecation messages about @option{-ftransition=import} anomalies.
 @item complex
 List all usages of complex or imaginary types.
 @item dip1000
@@ -644,14 +642,6 @@ Implements @uref{http://wiki.dlang.org/DIP1000} (experimental).
 Implements @uref{http://wiki.dlang.org/DIP25} (experimental).
 @item field
 List all non-mutable fields which occupy an object instance.
-@item import
-Tells the compiler to revert to using an old lookup behavior for resolving
-unqualified symbol names, where this was done in a single pass, ignoring
-any protection attributes.  The default name lookup strategy is to use two
-passes, the first ignoring imported declarations, and the second only
-looking at imports.  The protection (@code{private}, @code{package},
-@code{protected}) of symbols is also enforced to resolve any conflicts
-between private and public symbols.
 @item nogc
 List all hidden GC allocations.
 @item tls
index 6c8dfbfc09461b579a460a9b5c1b8331b139fbf5..62e9f8ecfd2f8c999478dead00be6fd1e7e45656 100644 (file)
@@ -289,10 +289,6 @@ ftransition=all
 D RejectNegative
 List information on all language changes.
 
-ftransition=checkimports
-D RejectNegative
-Give deprecation messages about -ftransition=import anomalies.
-
 ftransition=complex
 D RejectNegative
 List all usages of complex or imaginary types.
@@ -309,10 +305,6 @@ ftransition=field
 D RejectNegative
 List all non-mutable fields which occupy an object instance.
 
-ftransition=import
-D RejectNegative
-Revert to single phase name lookup.
-
 ftransition=nogc
 D RejectNegative
 List all hidden GC allocations.
diff --git a/gcc/testsuite/gdc.test/compilable/checkimports3.d b/gcc/testsuite/gdc.test/compilable/checkimports3.d
new file mode 100644 (file)
index 0000000..770b382
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+REQUIRED_ARGS: -de
+EXTRA_FILES: imports/checkimports3a.d imports/checkimports3b.d imports/checkimports3c.d
+*/
+import imports.checkimports3a;
+import imports.checkimports3b;
+import imports.checkimports3c;
+
+void test()
+{
+    foo();
+}
index 759287cfecfe112177524b36aceef65b597cceb7..af396330517e8639e1a289b47b9f38eeedbe372e 100644 (file)
@@ -1,12 +1,6 @@
 // PERMUTE_ARGS:
 // REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -w -o-
 
-/*
-TEST_OUTPUT:
----
----
-*/
-
 /** Blah
  Params:
     T = some type
index 9c82add1776a7bc7ab970983336e2f02e4d44b76..e91db649ceeb90ea3027b1388a282241bd8f19e2 100644 (file)
@@ -1,11 +1,5 @@
 // REQUIRED_ARGS: -dw
 // PERMUTE_ARGS:
-/*
-TEST_OUTPUT:
----
----
-*/
-
 class C
 {
     void bug()
index 3d9383189a53377a478376c9bc45a619414a8e21..598ff8592213876ee2b3d0a21fcf17e9a87bfd7f 100644 (file)
@@ -1,10 +1,4 @@
 // REQUIRED_ARGS: -w -profile
-/*
-TEST_OUTPUT:
----
----
-*/
-
 void main()
 {
     string s;
diff --git a/gcc/testsuite/gdc.test/compilable/diag12598.d b/gcc/testsuite/gdc.test/compilable/diag12598.d
new file mode 100644 (file)
index 0000000..8f98188
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+REQUIRED_ARGS:
+EXTRA_FILES: imports/diag12598a.d
+*/
+
+class C
+{
+    void f()
+    {
+        import imports.diag12598a;
+        lines ~= "";
+    }
+
+    string[] lines;
+}
+
+void main()
+{
+}
index b25d0bb3819d18f303504f296e772977840849e1..7d034d80b622e01dc22f7d954264063eae652e60 100644 (file)
@@ -1,11 +1,5 @@
 // REQUIRED_ARGS: -vtls
 // PERMUTE_ARGS:
-/*
-TEST_OUTPUT:
----
----
-*/
-
 template T()
 {
     static this() {}
diff --git a/gcc/testsuite/gdc.test/compilable/dip22d.d b/gcc/testsuite/gdc.test/compilable/dip22d.d
new file mode 100644 (file)
index 0000000..1becf0c
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+REQUIRED_ARGS:
+*/
+
+// https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP22.md
+
+import imports.dip22d;
+import imports.dip22e;
+
+Foo foo;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/checkimports3a.d b/gcc/testsuite/gdc.test/compilable/imports/checkimports3a.d
new file mode 100644 (file)
index 0000000..85e6cd8
--- /dev/null
@@ -0,0 +1 @@
+void foo() {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/checkimports3b.d b/gcc/testsuite/gdc.test/compilable/imports/checkimports3b.d
new file mode 100644 (file)
index 0000000..37ea7ae
--- /dev/null
@@ -0,0 +1 @@
+private void foo(int) {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/checkimports3c.d b/gcc/testsuite/gdc.test/compilable/imports/checkimports3c.d
new file mode 100644 (file)
index 0000000..93b4ac5
--- /dev/null
@@ -0,0 +1 @@
+void foo(string) {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/diag12598a.d b/gcc/testsuite/gdc.test/compilable/imports/diag12598a.d
new file mode 100644 (file)
index 0000000..dee0054
--- /dev/null
@@ -0,0 +1,3 @@
+module imports.diag12598a;
+
+struct lines { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/dip22d.d b/gcc/testsuite/gdc.test/compilable/imports/dip22d.d
new file mode 100644 (file)
index 0000000..9f80442
--- /dev/null
@@ -0,0 +1,5 @@
+module imports.dip22d;
+
+private struct Foo {}
+private void foo() {}
+private void bar() {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/dip22e.d b/gcc/testsuite/gdc.test/compilable/imports/dip22e.d
new file mode 100644 (file)
index 0000000..3464e60
--- /dev/null
@@ -0,0 +1,4 @@
+module imports.dip22e;
+
+public struct Foo {}
+public void bar(int) {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/imp15925.d b/gcc/testsuite/gdc.test/compilable/imports/imp15925.d
deleted file mode 100644 (file)
index c9d537a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-enum X = 1;
index 53cc377e632542e2633aa7e18036400d683a7ca8..464c8405de2769ec723c8508e4911a36d1f6658c 100644 (file)
@@ -1,10 +1,5 @@
 // REQUIRED_ARGS:
 // PERMUTE_ARGS:
-/*
-TEST_OUTPUT:
----
----
-*/
 deprecated
 module test12567a;
 
index 2e37d31c78638a4c26ad2f83ee55d701c4931e71..9b9d7e171c288b1545829bec8da2411254624888 100644 (file)
@@ -1,10 +1,5 @@
 // REQUIRED_ARGS:
 // PERMUTE_ARGS:
-/*
-TEST_OUTPUT:
----
----
-*/
 deprecated("message")
 module test12567b;
 
index 512f0b76e23b04319c2a342a3de060e72a5bf2b5..ee7bc294d6c77ab27eef71daac3c1b289fbf4329 100644 (file)
@@ -1,10 +1,5 @@
 // REQUIRED_ARGS: -d
 // PERMUTE_ARGS:
-/*
-TEST_OUTPUT:
----
----
-*/
 import imports.a12567;
 
 void main() { foo(); }
index 14c72bc5afb4412cc04b7eb7052680d8782054fd..2e74cf7f05cf78ae1635719dc23e8e94111236d6 100644 (file)
@@ -1,7 +1,2 @@
 // REQUIRED_ARGS: -o-
-/*
-TEST_OUTPUT:
----
----
-*/
 deprecated("a" ~ "b") module fail12567;
index 3f8b4219c96b9ac7995c4e1fda9766760f1fa572..ddd4c90f4867984332390be994e50b7596122783 100644 (file)
@@ -1,10 +1,4 @@
 // PERMUTE_ARGS: -w -wi
-/*
-TEST_OUTPUT:
----
----
-*/
-
 @system:
 
 struct S
index 30206d844cdc91e661904a52b9d79e292214f259..ccff8d56314f011b50325de6c2312adc88581c24 100644 (file)
@@ -1,8 +1,4 @@
-/*
-TEST_OUTPUT:
----
----
- */
+// https://issues.dlang.org/show_bug.cgi?id=14375
 interface IKeysAPI(string greetings) {
     static assert(greetings == "Hello world", greetings);
 }
index c8ad24096e858ebe484bac00183e1039d19da6d7..483c080861cd3a1965f0e3c8eab355b163040f13 100644 (file)
@@ -1,10 +1,5 @@
 // REQUIRED_ARGS: -de
 // PERMUTE_ARGS:
-/*
-TEST_OUTPUT:
----
----
-*/
 import imports.test15785;
 
 class Derived : Base, IBase2
index b61d1c4a81220ba4a3132a31b015b444ea5a16c5..8a5c42578938c698810be03fe5a77ac5b9c898dd 100644 (file)
@@ -1,4 +1,4 @@
-// REQUIRED_ARGS: -transition=checkimports -de
+// REQUIRED_ARGS: -de
 // PERMUTE_ARGS:
 /*
 TEST_PUTPUT:
diff --git a/gcc/testsuite/gdc.test/compilable/test15925.d b/gcc/testsuite/gdc.test/compilable/test15925.d
deleted file mode 100644 (file)
index 871af4e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* REQUIRED_ARGS: -transition=import -transition=checkimports
-PERMUTE_ARGS:
-TEST_OUTPUT:
----
-compilable/test15925.d(17): Deprecation: local import search method found variable imp15925.X instead of nothing
----
-*/
-
-mixin template Import()
-{
-    import imports.imp15925;
-}
-
-class Foo
-{
-    mixin Import!();
-    static assert(X == 1);
-}
index 3244c129aa94e6cac36600a3065a51f98dfcff8e..cfd02441dcba7726ffd5652eb570ea67b3bf00bf 100644 (file)
@@ -1,9 +1,4 @@
-/*
-REQUIRED_ARGS: -de
-TEST_OUTPUT:
----
----
-*/
+// REQUIRED_ARGS: -de
 deprecated("A deprecated class") {
 class DepClass
 {
index 405d9fc9d90426cd21f16e6c36b2190405e7a364..631c02070b4145341798f9aa49d8d58818f3bc4a 100644 (file)
@@ -1,10 +1,4 @@
 // REQUIRED_ARGS: -o-
-/*
-TEST_OUTPUT:
----
----
-*/
-
 mixin template Helpers()
 {
     static if (is(Flags!Move))
index 328b8a9825b12dbb00ecc44e038417f93f7d15e2..ee9764aaafd41ac093629df481158c6d29169376 100644 (file)
@@ -1,9 +1,5 @@
-// REQUIRED_ARGS: -transition=checkimports -de
-/*
-TEST_OUTPUT:
----
----
-*/
+// REQUIRED_ARGS:
+// EXTRA_FILES: imports/test15857a.d imports/test15857b.d imports/test15857c.d
 
 // https://issues.dlang.org/show_bug.cgi?id=15825
 
index bf824b8c035fd757214a6fd8fad1f643cd43c146..d981a47acdf7bb69d5830a55fb9c142ee2de735a 100644 (file)
@@ -1,10 +1,4 @@
 // PERMUTE_ARGS: -w -wi -debug
-/*
-TEST_OUTPUT:
----
----
-*/
-
 @safe pure nothrow void strictVoidReturn(T)(T x) {}
 @safe pure nothrow void nonstrictVoidReturn(T)(ref T x) {}
 
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports1a.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports1a.d
deleted file mode 100644 (file)
index a27ddea..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// REQUIRED_ARGS: -transition=checkimports -de
-/*
-TEST_OUTPUT:
----
-fail_compilation/checkimports1a.d(16): Deprecation: local import search method found struct imports.diag12598a.lines instead of variable checkimports1a.C.lines
----
-*/
-
-
-// new lookup + information
-class C
-{
-    void f()
-    {
-        import imports.diag12598a;
-        lines ~= "";
-    }
-
-    string[] lines;
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports1b.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports1b.d
deleted file mode 100644 (file)
index 60d3ae8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// REQUIRED_ARGS: -transition=import -transition=checkimports
-/*
-TEST_OUTPUT:
----
-fail_compilation/checkimports1b.d(16): Deprecation: local import search method found struct imports.diag12598a.lines instead of variable checkimports1b.C.lines
-fail_compilation/checkimports1b.d(16): Error: struct 'lines' is a type, not an lvalue
----
-*/
-
-// old lookup + information
-class C
-{
-    void f()
-    {
-        import imports.diag12598a;
-        lines ~= "";
-    }
-
-    string[] lines;
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports1c.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports1c.d
deleted file mode 100644 (file)
index f6587ef..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// REQUIRED_ARGS: -transition=checkimports -transition=import
-/*
-TEST_OUTPUT:
----
-fail_compilation/checkimports1c.d(16): Deprecation: local import search method found struct imports.diag12598a.lines instead of variable checkimports1c.C.lines
-fail_compilation/checkimports1c.d(16): Error: struct 'lines' is a type, not an lvalue
----
-*/
-
-// old lookup + information (the order of switches is reverse)
-class C
-{
-    void f()
-    {
-        import imports.diag12598a;
-        lines ~= "";
-    }
-
-    string[] lines;
-}
index 567a30844c324965ef90d9688a4abafc6315f327..abec4242eeca502e57739ac200282f52a3b94e54 100644 (file)
@@ -1,16 +1,11 @@
-// REQUIRED_ARGS: -transition=checkimports
+// REQUIRED_ARGS:
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/checkimports2a.d(26): Deprecation: local import search method found variable imports.imp2.X instead of variable checkimports2a.X
-fail_compilation/checkimports2a.d(32): Deprecation: local import search method found variable imports.imp2.X instead of nothing
-fail_compilation/checkimports2a.d(32): Error: no property 'X' for type 'checkimports2a.B'
-fail_compilation/checkimports2a.d(32):        while evaluating: `static assert((B).X == 0)`
-fail_compilation/checkimports2a.d(33): Deprecation: local import search method found variable imports.imp2.Y instead of nothing
-fail_compilation/checkimports2a.d(33): Error: no property 'Y' for type 'checkimports2a.B'
-fail_compilation/checkimports2a.d(33):        while evaluating: `static assert((B).Y == 2)`
-fail_compilation/checkimports2a.d(35): Deprecation: local import search method found variable imports.imp2.X instead of variable checkimports2a.X
-fail_compilation/checkimports2a.d(36): Deprecation: local import search method found variable imports.imp2.Y instead of variable imports.imp1.Y
+fail_compilation/checkimports2a.d(27): Error: no property `X` for type `checkimports2a.B`, did you mean `imports.imp2.X`?
+fail_compilation/checkimports2a.d(27):        while evaluating: `static assert((B).X == 0)`
+fail_compilation/checkimports2a.d(28): Error: no property `Y` for type `checkimports2a.B`, did you mean `imports.imp2.Y`?
+fail_compilation/checkimports2a.d(28):        while evaluating: `static assert((B).Y == 2)`
 ---
 */
 
index 4f52521dd2670cbcebab8dbe6778784a7416e584..8b99fdc54058a727f2793642dc71cb56db68a88a 100644 (file)
@@ -1,17 +1,8 @@
-// REQUIRED_ARGS: -transition=import -transition=checkimports -de
+// REQUIRED_ARGS:
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/checkimports2b.d(27): Deprecation: local import search method found variable imports.imp2.X instead of variable checkimports2b.X
-fail_compilation/checkimports2b.d(27):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2b.d(33): Deprecation: local import search method found variable imports.imp2.X instead of nothing
-fail_compilation/checkimports2b.d(33):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2b.d(34): Deprecation: local import search method found variable imports.imp2.Y instead of nothing
-fail_compilation/checkimports2b.d(34):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2b.d(36): Deprecation: local import search method found variable imports.imp2.X instead of variable checkimports2b.X
-fail_compilation/checkimports2b.d(36):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2b.d(37): Deprecation: local import search method found variable imports.imp2.Y instead of variable imports.imp1.Y
-fail_compilation/checkimports2b.d(37):        while evaluating: `static assert(2 == 2)`
+fail_compilation/checkimports2b.d(18): Error: static assert:  `0 == 2` is false
 ---
 */
 
index f56da9c013b08c82e6bcfffe1e902a2f9c7fd797..4208dcdf6b2a16006ebfeea92eeb67dd245961ef 100644 (file)
@@ -1,18 +1,8 @@
-// REQUIRED_ARGS: -transition=checkimports -transition=import -de
+// REQUIRED_ARGS:
 /*
 TEST_OUTPUT:
 ---
-
-fail_compilation/checkimports2c.d(28): Deprecation: local import search method found variable imports.imp2.X instead of variable checkimports2c.X
-fail_compilation/checkimports2c.d(28):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2c.d(34): Deprecation: local import search method found variable imports.imp2.X instead of nothing
-fail_compilation/checkimports2c.d(34):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2c.d(35): Deprecation: local import search method found variable imports.imp2.Y instead of nothing
-fail_compilation/checkimports2c.d(35):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2c.d(37): Deprecation: local import search method found variable imports.imp2.X instead of variable checkimports2c.X
-fail_compilation/checkimports2c.d(37):        while evaluating: `static assert(2 == 2)`
-fail_compilation/checkimports2c.d(38): Deprecation: local import search method found variable imports.imp2.Y instead of variable imports.imp1.Y
-fail_compilation/checkimports2c.d(38):        while evaluating: `static assert(2 == 2)`
+fail_compilation/checkimports2c.d(18): Error: static assert:  `0 == 2` is false
 ---
 */
 
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports3.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports3.d
deleted file mode 100644 (file)
index e9d44a7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-REQUIRED_ARGS: -transition=checkimports -de
-TEST_OUTPUT:
----
-fail_compilation/checkimports3.d(14): Deprecation: local import search method found overloadset checkimports3.foo (3 overloads) instead of overloadset checkimports3.foo (2 overloads)
----
-*/
-import imports.checkimports3a;
-import imports.checkimports3b;
-import imports.checkimports3c;
-
-void test()
-{
-    foo();
-}
index 2a9714ddf1b06f00963a0160c0be175fc3f1f1fd..3c35b66c045f418354f72bc31a8df4dacfa915aa 100644 (file)
@@ -1,8 +1,7 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/diag10169.d(12): Deprecation: imports.a10169.B.x is not visible from module diag10169
-fail_compilation/diag10169.d(12): Error: struct imports.a10169.B member `x` is not accessible
+fail_compilation/diag10169.d(11): Error: no property `x` for type `B`, did you mean `imports.a10169.B.x`?
 ---
 */
 import imports.a10169;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12598.d b/gcc/testsuite/gdc.test/fail_compilation/diag12598.d
deleted file mode 100644 (file)
index 236692d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-REQUIRED_ARGS: -transition=import
-TEST_OUTPUT:
----
-fail_compilation/diag12598.d(14): Error: struct 'lines' is a type, not an lvalue
----
-*/
-
-class C
-{
-    void f()
-    {
-        import imports.diag12598a;
-        lines ~= "";
-    }
-
-    string[] lines;
-}
-
-void main()
-{
-}
index 131659c3170c25c32dae7f4a66ac84f66ae0d20d..7c81b168c70d45d6f042e9e140988081173f5777 100644 (file)
@@ -1,22 +1,14 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/diag5385.d(27): Deprecation: imports.fail5385.C.privX is not visible from module diag5385
-fail_compilation/diag5385.d(27): Error: class imports.fail5385.C member `privX` is not accessible
-fail_compilation/diag5385.d(28): Deprecation: imports.fail5385.C.packX is not visible from module diag5385
-fail_compilation/diag5385.d(28): Error: class imports.fail5385.C member `packX` is not accessible
-fail_compilation/diag5385.d(29): Deprecation: imports.fail5385.C.privX2 is not visible from module diag5385
-fail_compilation/diag5385.d(29): Error: class imports.fail5385.C member `privX2` is not accessible
-fail_compilation/diag5385.d(30): Deprecation: imports.fail5385.C.packX2 is not visible from module diag5385
-fail_compilation/diag5385.d(30): Error: class imports.fail5385.C member `packX2` is not accessible
-fail_compilation/diag5385.d(31): Deprecation: imports.fail5385.S.privX is not visible from module diag5385
-fail_compilation/diag5385.d(31): Error: struct imports.fail5385.S member `privX` is not accessible
-fail_compilation/diag5385.d(32): Deprecation: imports.fail5385.S.packX is not visible from module diag5385
-fail_compilation/diag5385.d(32): Error: struct imports.fail5385.S member `packX` is not accessible
-fail_compilation/diag5385.d(33): Deprecation: imports.fail5385.S.privX2 is not visible from module diag5385
-fail_compilation/diag5385.d(33): Error: struct imports.fail5385.S member `privX2` is not accessible
-fail_compilation/diag5385.d(34): Deprecation: imports.fail5385.S.packX2 is not visible from module diag5385
-fail_compilation/diag5385.d(34): Error: struct imports.fail5385.S member `packX2` is not accessible
+fail_compilation/diag5385.d(19): Error: no property `privX` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.privX`?
+fail_compilation/diag5385.d(20): Error: no property `packX` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.packX`?
+fail_compilation/diag5385.d(21): Error: no property `privX2` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.privX2`?
+fail_compilation/diag5385.d(22): Error: no property `packX2` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.packX2`?
+fail_compilation/diag5385.d(23): Error: no property `privX` for type `S`, did you mean `imports.fail5385.S.privX`?
+fail_compilation/diag5385.d(24): Error: no property `packX` for type `S`, did you mean `imports.fail5385.S.packX`?
+fail_compilation/diag5385.d(25): Error: no property `privX2` for type `S`, did you mean `imports.fail5385.S.privX2`?
+fail_compilation/diag5385.d(26): Error: no property `packX2` for type `S`, did you mean `imports.fail5385.S.packX2`?
 ---
 */
 
index 7497b428d3d93c302f1b04a29cda56a397ad5027..5bd2b5b03047b73aab9be6997f568b9849076d5c 100644 (file)
@@ -1,17 +1,12 @@
 /*
-REQUIRED_ARGS: -de
+REQUIRED_ARGS:
 TEST_OUTPUT:
 ---
-fail_compilation/dip22a.d(21): Deprecation: imports.dip22a.Klass.bar is not visible from module dip22a
-fail_compilation/dip22a.d(21): Error: class imports.dip22a.Klass member `bar` is not accessible
-fail_compilation/dip22a.d(22): Deprecation: imports.dip22a.Struct.bar is not visible from module dip22a
-fail_compilation/dip22a.d(22): Error: struct imports.dip22a.Struct member `bar` is not accessible
-fail_compilation/dip22a.d(23): Error: imports.dip22a.bar is not visible from module dip22a
-fail_compilation/dip22a.d(23): Error: function `imports.dip22a.bar` is not accessible from module `dip22a`
-fail_compilation/dip22a.d(24): Error: imports.dip22a.Template!int.bar is not visible from module dip22a
-fail_compilation/dip22a.d(24): Error: function `imports.dip22a.Template!int.bar` is not accessible from module `dip22a`
-fail_compilation/dip22a.d(25): Deprecation: imports.dip22a.bar is not visible from module dip22a
-fail_compilation/dip22a.d(25): Error: function `imports.dip22a.bar` is not accessible from module `dip22a`
+fail_compilation/dip22a.d(16): Error: no property `bar` for type `imports.dip22a.Klass`, did you mean `imports.dip22a.Klass.bar`?
+fail_compilation/dip22a.d(17): Error: no property `bar` for type `Struct`, did you mean `imports.dip22a.Struct.bar`?
+fail_compilation/dip22a.d(18): Error: undefined identifier `bar` in module `imports.dip22a`, did you mean function `bar`?
+fail_compilation/dip22a.d(19): Error: no property `bar` for type `void`
+fail_compilation/dip22a.d(20): Error: no property `bar` for type `int`
 ---
 */
 import imports.dip22a;
index 7aca88c09cb11bb4b4f851b159b3b2fc7dabb7e0..952018022de646c40864c2fd1f4ab25d488c6b45 100644 (file)
@@ -1,8 +1,8 @@
 /*
-REQUIRED_ARGS: -de
+REQUIRED_ARGS:
 TEST_OUTPUT:
 ---
-fail_compilation/dip22b.d(12): Deprecation: pkg.dip22c.Foo is not visible from module dip22
+fail_compilation/dip22b.d(12): Error: undefined identifier `Foo`, did you mean variable `foo`?
 ---
 */
 module pkg.dip22;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dip22d.d b/gcc/testsuite/gdc.test/fail_compilation/dip22d.d
deleted file mode 100644 (file)
index dd1b8ef..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
-REQUIRED_ARGS: -transition=import
-TEST_OUTPUT:
----
-fail_compilation/dip22d.d(12): Error: imports.dip22d.Foo at fail_compilation/imports/dip22d.d(3) conflicts with imports.dip22e.Foo at fail_compilation/imports/dip22e.d(3)
-fail_compilation/dip22d.d(12): Error: module dip22d struct imports.dip22d.Foo is private
----
-*/
-import imports.dip22d;
-import imports.dip22e;
-
-Foo foo;
index f82d8e73cda2b6cbc606a963ed029e15ddc8e7d9..b1411b2f10cdfbb4f45728a535d810a66424f2a2 100644 (file)
@@ -1,10 +1,8 @@
 /*
-REQUIRED_ARGS: -transition=checkimports -de
+REQUIRED_ARGS:
 TEST_OUTPUT:
 ---
-fail_compilation/dip22e.d(16): Deprecation: imports.dip22d.foo is not visible from module dip22e
-fail_compilation/dip22e.d(16): Error: function `imports.dip22d.foo` is not accessible from module `dip22e`
-fail_compilation/dip22e.d(17): Deprecation: local import search method found overloadset dip22e.bar (2 overloads) instead of function imports.dip22e.bar
+fail_compilation/dip22e.d(14): Error: undefined identifier `foo`, did you mean struct `Foo`?
 ---
 */
 
index c05a29a39c9204c47f43105f05b63fa3a8a912a3..067e83c035dfdfdad008956ec221a08d8f3d9437 100644 (file)
@@ -1,18 +1,14 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/fail10528.d(23): Error: module fail10528 variable a10528.a is private
-fail_compilation/fail10528.d(23): Deprecation: a10528.a is not visible from module fail10528
-fail_compilation/fail10528.d(24): Error: a10528.a is not visible from module fail10528
-fail_compilation/fail10528.d(26): Error: module fail10528 enum member a10528.b is private
-fail_compilation/fail10528.d(26): Deprecation: a10528.b is not visible from module fail10528
-fail_compilation/fail10528.d(27): Error: a10528.b is not visible from module fail10528
-fail_compilation/fail10528.d(29): Deprecation: a10528.S.c is not visible from module fail10528
-fail_compilation/fail10528.d(29): Error: variable `a10528.S.c` is not accessible from module `fail10528`
-fail_compilation/fail10528.d(30): Error: variable `a10528.S.c` is not accessible from module `fail10528`
-fail_compilation/fail10528.d(32): Deprecation: a10528.C.d is not visible from module fail10528
-fail_compilation/fail10528.d(32): Error: variable `a10528.C.d` is not accessible from module `fail10528`
-fail_compilation/fail10528.d(33): Error: variable `a10528.C.d` is not accessible from module `fail10528`
+fail_compilation/fail10528.d(19): Error: undefined identifier `a`
+fail_compilation/fail10528.d(20): Error: undefined identifier `a` in module `a10528`, did you mean variable `a`?
+fail_compilation/fail10528.d(22): Error: undefined identifier `b`
+fail_compilation/fail10528.d(23): Error: undefined identifier `b` in module `a10528`, did you mean enum member `b`?
+fail_compilation/fail10528.d(25): Error: no property `c` for type `S`, did you mean `a10528.S.c`?
+fail_compilation/fail10528.d(26): Error: no property `c` for type `S`, did you mean `a10528.S.c`?
+fail_compilation/fail10528.d(28): Error: no property `d` for type `a10528.C`, did you mean `a10528.C.d`?
+fail_compilation/fail10528.d(29): Error: no property `d` for type `a10528.C`, did you mean `a10528.C.d`?
 ---
 */
 
index 93e6af086ff8a09141585dfaadaa780394ac2b77..6d15e1a54d6cfc6d3fbca7bf812d9ca9bc7a6435 100644 (file)
@@ -1,7 +1,7 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/fail262.d(23): Error: function fail262.B.f does not override any function
+fail_compilation/fail262.d(23): Error: function `const void fail262.B.f()` does not override any function, did you mean to override `shared const void fail262.A.f()`?
 ---
 */
 
index 8f11001721f7f1e47866a278b5a1c6a983e29b07..a2c289059bea5d58a315b5a9f20567e3ddf3c7e3 100644 (file)
@@ -2,11 +2,9 @@
 REQUIRED_ARGS: -de
 TEST_OUTPUT:
 ---
-fail_compilation/fail313.d(18): Deprecation: module imports.b313 is not accessible here, perhaps add 'static import imports.b313;'
-fail_compilation/fail313.d(25): Deprecation: imports.a313.core is not visible from module test313
-fail_compilation/fail313.d(25): Deprecation: package core.stdc is not accessible here
-fail_compilation/fail313.d(25): Deprecation: module core.stdc.stdio is not accessible here, perhaps add 'static import core.stdc.stdio;'
-fail_compilation/fail313.d(30): Deprecation: package imports.pkg313 is not accessible here, perhaps add 'static import imports.pkg313;'
+fail_compilation/fail313.d(15): Error: undefined identifier `b313` in package `imports`, perhaps add `static import imports.b313;`
+fail_compilation/fail313.d(22): Error: undefined identifier `core`
+fail_compilation/fail313.d(27): Error: undefined identifier `pkg313` in package `imports`, perhaps add `static import imports.pkg313;`
 ---
 */
 module test313;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3a.d
deleted file mode 100644 (file)
index 85e6cd8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-void foo() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3b.d
deleted file mode 100644 (file)
index 37ea7ae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-private void foo(int) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3c.d b/gcc/testsuite/gdc.test/fail_compilation/imports/checkimports3c.d
deleted file mode 100644 (file)
index 93b4ac5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-void foo(string) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/diag12598a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/diag12598a.d
deleted file mode 100644 (file)
index dee0054..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-module imports.diag12598a;
-
-struct lines { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp15925.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp15925.d
new file mode 100644 (file)
index 0000000..c9d537a
--- /dev/null
@@ -0,0 +1 @@
+enum X = 1;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp21353.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp21353.d
new file mode 100644 (file)
index 0000000..e498b64
--- /dev/null
@@ -0,0 +1,7 @@
+module imports.imp21353;
+
+struct A { int x; }
+
+struct B { import imports.imp21353 : A; }
+
+private struct P { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test15117a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test15117a.d
new file mode 100644 (file)
index 0000000..9daf6f1
--- /dev/null
@@ -0,0 +1,9 @@
+module imports.test15117a;
+
+struct AssertResult {}
+
+auto test_usr_1()
+{
+    // 2. generate TyepInfoStructDeclaration
+    auto x = typeid(AssertResult);
+}
index 0bb5385931042510a92228d95dc900c2e28c333c..aedb44e65fd84eb3ba0b487f072a11ce3f680d73 100644 (file)
@@ -1,9 +1,9 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/lookup.d(23): Error: no property 'X' for type 'lookup.B'
+fail_compilation/lookup.d(23): Error: no property `X` for type `lookup.B`, did you mean `imports.imp2.X`?
 fail_compilation/lookup.d(23):        while evaluating: `static assert((B).X == 0)`
-fail_compilation/lookup.d(24): Error: no property 'Y' for type 'lookup.B'
++fail_compilation/lookup.d(24): Error: no property `Y` for type `lookup.B`, did you mean `imports.imp2.Y`?
 fail_compilation/lookup.d(24):        while evaluating: `static assert((B).Y == 2)`
 ---
 */
index 1a1ed70698bf3a0dd6fea1d4168c0e2e910ca9e5..c95ecc111faa37ad9a3341c2ca75da59c6ff164e 100644 (file)
@@ -4,7 +4,7 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/test143.d(20): Error: undefined identifier `x`
+fail_compilation/test143.d(19): Error: undefined identifier `x`
 ---
 */
 module test143;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15117.d b/gcc/testsuite/gdc.test/fail_compilation/test15117.d
new file mode 100644 (file)
index 0000000..e6ce3b5
--- /dev/null
@@ -0,0 +1,30 @@
+// REQUIRED_ARGS: -o-
+// PERMUTE_ARGS:
+// COMPILED_IMPORTS: imports/test15117a.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test15177.d-mixin-20(20): Error: `imports.test15117a.object` is not visible from module `test15177`
+fail_compilation/test15177.d(29): Error: template instance `test15177.RunApiTest!()` error instantiating
+---
+*/
+
+import users = imports.test15117a;
+
+void RunApiTest(T...)()
+{
+    foreach (name; __traits(allMembers, users))
+    {
+        // 3. list the name of TyepInfoStructDeclaration,
+        //    but it's just internal symbol and invisible.
+        mixin("alias func = users . " ~ name ~ ";");
+    }
+}
+
+void main()
+{
+    // 1. run semantic3 of users.test_usr_1
+    users.test_usr_1();
+
+    RunApiTest!();
+}
index b35e5105436095383cbed6b597e826a3c87f4869..474076fd5e44071411897cce2a6711a769fdda03 100644 (file)
@@ -2,12 +2,11 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/test15785.d(17): Deprecation: imports.test15785.Base.foo is not visible from module test15785
-fail_compilation/test15785.d(17): Error: class test15785.Derived member `foo` is not accessible
-fail_compilation/test15785.d(18): Deprecation: imports.test15785.Base.bar is not visible from module test15785
-fail_compilation/test15785.d(18): Error: class test15785.Derived member `bar` is not accessible
+fail_compilation/test15785.d(16): Error: no property `foo` for type `imports.test15785.Base`, did you mean `imports.test15785.Base.foo`?
+fail_compilation/test15785.d(17): Error: undefined identifier `bar`
 ---
 */
+
 import imports.test15785;
 
 class Derived : Base
index 1613617bcd0157dae7969e9ebe078ce4d266747d..e09b4bfbc7c3b0d909c3e338c3c2f8162842c7e9 100644 (file)
@@ -1,11 +1,11 @@
-// REQUIRED_ARGS: -de
+// REQUIRED_ARGS:
 // PERMUTE_ARGS:
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/test15785b.d(15): Deprecation: imports.test15785.Base.T is not visible from module test15785b
-fail_compilation/test15785b.d(16): Deprecation: imports.test15785.Base.T is not visible from module test15785b
-fail_compilation/test15785b.d(17): Deprecation: imports.test15785.IBase2.T is not visible from module test15785b
+fail_compilation/test15785b.d(15): Error: `imports.test15785.Base.T` is not visible from module `test15785b`
+fail_compilation/test15785b.d(16): Error: `imports.test15785.Base.T` is not visible from module `test15785b`
+fail_compilation/test15785b.d(17): Error: `imports.test15785.IBase2.T` is not visible from module `test15785b`
 ---
 */
 import imports.test15785;
index 19c65b464194dd2a7775f35fff215f362043c261..aa22c10b76fd9879b01d5e9d7b35448eba77c72a 100644 (file)
@@ -2,7 +2,7 @@
 /*
 TEST_OUTPUT:
 ---
-fail_compilation/test15897.d(18): Deprecation: test15897.Animal.create is not visible from class Cat
+fail_compilation/test15897.d(18): Error: no property `create` for type `imports.test15897.Cat`
 ---
 */
 module test15897;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15925.d b/gcc/testsuite/gdc.test/fail_compilation/test15925.d
new file mode 100644 (file)
index 0000000..9359859
--- /dev/null
@@ -0,0 +1,19 @@
+/* REQUIRED_ARGS:
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+fail_compilation/test15925.d(18): Error: undefined identifier `X`
+fail_compilation/test15925.d(18):        while evaluating: `static assert(X == 1)`
+---
+*/
+
+mixin template Import()
+{
+    import imports.imp15925;
+}
+
+class Foo
+{
+    mixin Import!();
+    static assert(X == 1);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21353.d b/gcc/testsuite/gdc.test/fail_compilation/test21353.d
new file mode 100644 (file)
index 0000000..0f22fe7
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+EXTRA_FILES: imports/imp21353.d
+TEST_OUTPUT:
+---
+fail_compilation/test21353.d(19): Error: no property `A` for type `imports.imp21353.B`
+fail_compilation/test21353.d(20): Error: no property `A` for type `imports.imp21353.B`
+fail_compilation/test21353.d(21): Error: no property `A` for type `imports.imp21353.B`
+fail_compilation/test21353.d(23): Error: undefined identifier `P` in module `imports.imp21353`
+fail_compilation/test21353.d(24): Error: undefined identifier `P` in module `imports.imp21353`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=21353
+
+import imports.imp21353;
+
+void main()
+{
+    B.A;
+    with (B) { A(0); }
+    with (B()) { A(0); } // fixed
+
+    imports.imp21353.P();
+    with (imports.imp21353) { P(); } // fixed
+}
+
index 3dea03fa6b4d0aa87c41653a8a69ff988700a5cf..eb3f07d378a2f7d36e8a962c03e464ac3714bebd 100644 (file)
@@ -1,11 +1,11 @@
 /*
-REQUIRED_ARGS: -de
+REQUIRED_ARGS:
 TEST_OUTPUT:
 ---
-fail_compilation/test314.d(19): Deprecation: imports.a314.renamed is not visible from module test314
-fail_compilation/test314.d(20): Deprecation: imports.a314.bug is not visible from module test314
-fail_compilation/test314.d(22): Deprecation: imports.b314.renamedpkg is not visible from module test314
-fail_compilation/test314.d(23): Deprecation: imports.b314.bugpkg is not visible from module test314
+fail_compilation/test314.d(19): Error: undefined identifier `renamed`
+fail_compilation/test314.d(20): Error: undefined identifier `bug`
+fail_compilation/test314.d(22): Error: undefined identifier `renamedpkg`
+fail_compilation/test314.d(23): Error: undefined identifier `bugpkg`
 ---
 */