www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1238] New: (private) std.stream.isdigit conflicts with std.ctype.isdigit

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: ryg 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.


-- 
May 17 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1238


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
           Keywords|                            |rejects-valid
            Summary|(private) std.stream.isdigit|Private identifiers in
                   |conflicts with              |imported modules create
                   |std.ctype.isdigit           |conflicts wtih public ones




------- Comment #1 from smjg iname.com  2007-06-26 05:52 -------
A self-contained testcase:
----------
module ppc_1a;
import ppc_1b;
import ppc_1c;

int qwert = yuiop;
----------
module ppc_1b;

private int yuiop;
----------
module ppc_1c;

public int yuiop;
----------
ppc_1a.d(5): Error: ppc_1b.yuiop at ppc_1b.d(3) conflicts with ppc_1c.yuiop at
ppc_1c.d(3)
ppc_1a.d: module ppc_1a ppc_1b.yuiop is private
----------


-- 
Jun 26 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1238


dsimcha yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com




------- Comment #2 from dsimcha yahoo.com  2008-08-06 12:15 -------
*** Bug 1754 has been marked as a duplicate of this bug. ***


-- 
Aug 06 2008