-
-
Notifications
You must be signed in to change notification settings - Fork 683
Turn deprecation into error for issue 313 #8443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| The deprecation phase for fully qualified names that bypassed private imports is finished | ||
|
|
||
| --- | ||
| // a.d | ||
| import std.stdio; | ||
| --- | ||
|
|
||
| --- | ||
| // b.d | ||
| import a; | ||
|
|
||
| void main() | ||
| { | ||
| std.stdio.writefln("foo"); // deprecation before patch, now errors | ||
| } | ||
| --- | ||
|
|
||
| In order to compile the example successfully, `public` needs to be added | ||
| to the import located in `a.d` : `public import std.stdio;` or `import std.stdio;` | ||
| needs to be added to `b.d`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| // PERMUTE_ARGS: | ||
|
|
||
| module dstress.run.module_01; | ||
| module run.module_01; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this change necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not entirely sure why, but for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But the folder
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually its runnable
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That module declaration looks like a leftover from when code was copied into the |
||
|
|
||
| import core.memory; | ||
| import core.exception; | ||
|
|
@@ -170,9 +170,9 @@ int i; | |
|
|
||
| void test7() | ||
| { | ||
| assert(dstress.run.module_01.i==0); | ||
| dstress.run.module_01.i++; | ||
| assert(dstress.run.module_01.i==1); | ||
| assert(run.module_01.i==0); | ||
| run.module_01.i++; | ||
| assert(run.module_01.i==1); | ||
| } | ||
|
|
||
| /* ================================ */ | ||
|
|
@@ -699,7 +699,7 @@ void test32() | |
| assert(!(ti is null)); | ||
| writefln("%s %d %d", ti.toString(), ti.tsize, (MyUnion32*).sizeof); | ||
| assert(ti.tsize==(MyUnion32*).sizeof); | ||
| assert(ti.toString()=="dstress.run.module_01.MyUnion32*"); | ||
| assert(ti.toString()=="run.module_01.MyUnion32*"); | ||
| } | ||
|
|
||
| /* ================================ */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than deleting this, should we instead add
static import pkgDIP32.datetime.common, perhaps in a different scope?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point in that: the code will error if that different scope does not include
test7's scope.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative would be
static assert(!__traits(compiles, ...)