-0fc786f4908aa6bdd4220af87995333b1f24c3d7
+da26db81943952c7e35dab98650df589ec122485
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
#include "attrib.h"
#include "hdrgen.h"
-StringExp *semanticString(Scope *sc, Expression *exp, const char *s);
-
/********************************* Import ****************************/
Import::Import(Loc loc, Identifiers *packages, Identifier *id, Identifier *aliasId,
load(sc);
if (mod) // if successfully loaded module
{
+ mod->importAll(NULL);
+
if (mod->md && mod->md->isdeprecated)
{
Expression *msg = mod->md->msg;
- if (msg)
- msg = semanticString(sc, msg, "deprecation message");
if (StringExp *se = msg ? msg->toStringExp() : NULL)
mod->deprecation(loc, "is deprecated - %s", se->string);
else
mod->deprecation(loc, "is deprecated");
}
- mod->importAll(NULL);
-
if (sc->explicitProtection)
protection = sc->protection;
if (!isstatic && !aliasId && !names.dim)
TEST_OUTPUT
---
fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]`
-fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609a` is deprecated
-fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]`
-fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]`
-fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609b` is deprecated
+fail_compilation/fail19609.d(15): Deprecation: module `imports.fail19609a` is deprecated
fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]`
+fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609b` is deprecated
fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float`
-fail_compilation/fail19609.d(18): Deprecation: module `imports.fail19609c` is deprecated
-fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float`
+fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609c` is deprecated
+fail_compilation/imports/fail19609d.d(1): Error: undefined identifier `msg`
+fail_compilation/fail19609.d(19): Deprecation: module `imports.fail19609d` is deprecated
---
*/
import imports.fail19609a;
import imports.fail19609b;
import imports.fail19609c;
+enum msg = "You should not be able to see me";
+import imports.fail19609d;