digitalmars.D.bugs - [Issue 7421] New: std.getopt does not work with shared strings
- d-bugmail puremagic.com (61/61) Feb 01 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7421
- d-bugmail puremagic.com (11/11) Feb 16 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7421
- d-bugmail puremagic.com (10/10) Apr 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7421
http://d.puremagic.com/issues/show_bug.cgi?id=7421 Summary: std.getopt does not work with shared strings Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: robert octarineparrot.com --- Comment #0 from Robert Clipsham <robert octarineparrot.com> 2012-02-01 20:55:01 GMT --- When using the following: ---- import std.getopt; shared string foo; void main(string[] args) { getopt(args, "foo", &foo); } ---- Then using: $ dmd test.d $ ./test --foo=bar std.conv.ConvException /home/robert/.dvm/compilers/dmd-2.056/bin/../src/phobos/std/conv.d(1749): Can't convert value `oo' of type string to type immutable(char) ---------------- ./test(immutable(char) std.conv.toImpl!(immutable(char), immutable(char)[]).toImpl(immutable(char)[])+0x43) [0x80671c3] ./test(immutable(char) std.conv.to!(immutable(char)).to!(immutable(char)[]).to(immutable(char)[])+0xe) [0x80670a2] ./test(void std.getopt.handleOption!(shared(immutable(char)[])*).handleOption(immutable(char)[], shared(immutable(char)[])*, ref immutable(char)[][], ref std.getopt.configuration, bool)+0x393) [0x8066f13] ./test(void std.getopt.getoptImpl!(immutable(char)[], shared(immutable(char)[])*).getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, immutable(char)[], shared(immutable(char)[])*)+0x90) [0x8066b00] ./test(void std.getopt.getopt!(immutable(char)[], shared(immutable(char)[])*).getopt(ref immutable(char)[][], immutable(char)[], shared(immutable(char)[])*)+0x35) [0x8066a1d] ./test(_Dmain+0x1d) [0x80669e1] ./test(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x14) [0x8069a90] ./test(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x1d) [0x8069735] ./test(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x37) [0x8069ad7] ./test(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x1d) [0x8069735] ./test(main+0x94) [0x80696e4] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x60c113] ---------------- Removing the shared qualifier removes the issue. Tested with dmd 2.056 and dmd-master on Linux x86-32. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 01 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7421 Robert Clipsham <robert octarineparrot.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|std.getopt does not work |std.getopt does not work |with shared strings |with shared types --- Comment #1 from Robert Clipsham <robert octarineparrot.com> 2012-02-16 15:00:10 GMT --- It appears getopt() doesn't work with any shared types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 16 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7421 SomeDude <lovelydear mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear mailmetrash.com --- Comment #2 from SomeDude <lovelydear mailmetrash.com> 2012-04-20 00:53:59 PDT --- See also issue 7526 and issue 7693 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012