[Issue 6196] New: with statement with single statement breaks linking
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 22 11:10:40 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6196
Summary: with statement with single statement breaks linking
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-06-22 11:05:51 PDT ---
module test;
static import std.stdio;
void main()
{
with (std.stdio) writeln();
}
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
C:\DOCUME~1\Andrej\LOCALS~1\Temp\.rdmd\rdmd-test.d-A365FA805A6F8950E12081529066367B\test-d-A365FA805A6F8950E12081529066367B.obj(test-d-A365FA805A6F8950E12081529066367B)
Error 42: Symbol Undefined _D3std5stdio12__T7writelnZ7writelnFZv
This will work:
module test;
static import std.stdio;
void main()
{
with (std.stdio) { writeln(); }
}
Note how in the next example the first `with` statement has curly braces and
references writeln(), it gets linked in, and the linker errors are gone for the
second `with` statement:
static import std.stdio;
void main()
{
with (std.stdio) { writeln(); }
with (std.stdio) writeln();
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list