← Back to index
|
Original Bugzilla link
Bug 21589 – Mixing public and local selective imports causes behaviour differences
Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-28T13:19:18Z
Last change time
2024-12-13T19:14:20Z
Assigned to
No Owner
Creator
bradley.chatha
Moved to GitHub: dmd#18019 →
Comments
Comment #0
by bradley.chatha — 2021-01-28T13:19:18Z
Relevent forum post:
https://forum.dlang.org/post/
[email protected]
Code snippet 1: ``` import std; public import std.typecons : Nullable; import std.typecons : Nullable; alias T = Nullable!int; // onlineapp.Nullable or std.typecons.Nullable // depending on whether the public import exists or not pragma(msg, fullyQualifiedName!Nullable); // false if the public import exists, true otherwise. pragma(msg, isInstanceOf!(Nullable, T)); void main(){} ``` Code snippet 2: ``` import std; public import std.typecons : Nullable; import std.typecons : Nullable; alias T = Nullable!int; void fails() { // false pragma(msg, isInstanceOf!(Nullable, T)); } void passes() { // true import std.typecons : Nullable; pragma(msg, isInstanceOf!(Nullable, T)); } void main(){} ```
Comment #1
by robert.schadek — 2024-12-13T19:14:20Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/18019
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB