[Issue 1238] New: (private) std.stream.isdigit conflicts with	std.ctype.isdigit
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu May 17 07:00:44 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1238
           Summary: (private) std.stream.isdigit conflicts with
                    std.ctype.isdigit
           Product: D
           Version: 1.015
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ryg at gmx.net
Repro:
// ---- start
import std.stdio;
import std.stream;
import std.ctype;
void main()
{
  writefln("%d", isdigit('1'));
}
// ---- end
The problem seems to be the couple of "helper functions" at the end of
stream.d. Easiest workaround would probably simply declaring them static as
well as private (and the same probably applies to other module-scope private
variables/functions in Phobos).
Anyway, since the spec states that "Private module members are equivalent to
static declarations in C programs" (in "Attributes"), declaring anything
"private" at module scope should probably force static linkage.
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list