June 09, 2015 [Issue 1479] mixin error across two module | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=1479 Andrei Alexandrescu <andrei@erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|D1 & D2 |D2 -- |
August 15, 2019 [Issue 1479] mixin error across two module | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=1479 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |INVALID --- Comment #2 from RazvanN <razvan.nitu1305@gmail.com> --- This bug is invalid. When you instantiate `S2!(tpl) v;` in main (test.d), the symbol tpl is visible, so there's no problem. Now when S2 needs to be instantiated you instantiate S1 with the alias symbol t which points to tpl. This is fine also, but when you instantiate S1, you mixin the code that is contained by the tpl template which is `alias S2!(tpl) tt;`, so your S1 becomes: struct S1 { alias S2!tpl tt; } but in the file test1.d there is no tpl symbol, therefore you end up with the correct issued error. To fix this you just have to import test.d. Closing as invalid. -- |
Copyright © 1999-2021 by the D Language Foundation