digitalmars.D - Module renaming ignored when also using selective import
- Sebastian Lundstrom (9/9) Nov 03 2008 Hi! I'm using DMD 1.033 (with tangobos), so I'm not really sure about th...
- Christian Kamm (4/9) Nov 03 2008 No, this behaves as specified: you get Stdout from the selective import ...
- Sebastian Lundstrom (3/13) Nov 04 2008 Ah, my bad!
- bearophile (4/12) Nov 04 2008 I think that's a bit confusing syntax.
- Gide Nwawudu (6/11) Nov 04 2008 D is behaving as expected, see the section 'Renamed and Selective
Hi! I'm using DMD 1.033 (with tangobos), so I'm not really sure about this one. But when I both rename and use a selective import, the renaming doesn't seem to have any effect: import mystdout = tango.io.Stdout : Stdout; void main() { Stdout("Should require mystdout prefix?"); } The above code compiles and runs just fine. Same code attached to the post. Thank you for a great language! -Seb
Nov 03 2008
import mystdout = tango.io.Stdout : Stdout; void main() { Stdout("Should require mystdout prefix?"); }No, this behaves as specified: you get Stdout from the selective import and tango.io.Stdout as mystdout from the rename. See 'Renamed and Selective Imports' in http://www.digitalmars.com/d/1.0/module.html#ImportDeclaration .
Nov 03 2008
Christian Kamm Wrote:Ah, my bad! -Sebimport mystdout = tango.io.Stdout : Stdout; void main() { Stdout("Should require mystdout prefix?"); }No, this behaves as specified: you get Stdout from the selective import and tango.io.Stdout as mystdout from the rename. See 'Renamed and Selective Imports' in http://www.digitalmars.com/d/1.0/module.html#ImportDeclaration .
Nov 04 2008
Christian Kamm:I think that's a bit confusing syntax. Bye, bearophileimport mystdout = tango.io.Stdout : Stdout; void main() { Stdout("Should require mystdout prefix?"); }No, this behaves as specified: you get Stdout from the selective import and tango.io.Stdout as mystdout from the rename.
Nov 04 2008
On Mon, 03 Nov 2008 15:37:09 -0500, Sebastian Lundstrom <tretton gmail.com> wrote:import mystdout = tango.io.Stdout : Stdout; void main() { Stdout("Should require mystdout prefix?"); }D is behaving as expected, see the section 'Renamed and Selective Imports'. http://www.digitalmars.com/d/2.0/module.html Gide
Nov 04 2008