www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2775] New: "private" ignored for templates

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2775

           Summary: "private" ignored for templates
           Product: D
           Version: 1.041
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: cbkbbejeap mailinator.com


The following compiles successfully, but should result in some sort of "private
template not accessible" or "no such template in current scope" error:

// main.d
import imported;
void main()
{
        char[] str = foo!();
}

// imported.d
private template foo()
{
        const char[] foo = "foo";
}


-- 
Mar 31 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2775


jakobovrum gmail.com changed:

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




 The following compiles successfully, but should result in some sort of "private
 template not accessible" or "no such template in current scope" error:
 
 // main.d
 import imported;
 void main()
 {
     char[] str = foo!();
 }
 
 // imported.d
 private template foo()
 {
     const char[] foo = "foo";
 }
It happens for templated functions in DMD 2.039, as well. /* test.d */ module test; import std.stdio; class Class { private void foo(T...)(T args) { writeln("Hello, world!"); } } /* main.d */ module main; import test; int main() { scope a = new Class; a.foo(); return 0; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2775


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
            Version|D1 & D2                     |D1



22:15:18 PDT ---
Fix for D2: https://github.com/D-Programming-Language/dmd/pull/163

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 04 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2775


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg gmx.com



PST ---
Hasn't this been fixed now?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2012