Thread overview
[Issue 2227] New: Error forbidding a function template instantiation is not reported
Jul 15, 2008
d-bugmail
Jul 16, 2008
d-bugmail
Dec 02, 2008
d-bugmail
May 06, 2010
Don
July 15, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2227

           Summary: Error forbidding a function template instantiation is
                    not reported
           Product: D
           Version: 2.017
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: samukha@voliacable.com


template Bar(T)
{
    alias typeof(T.ini) Bar; // an error hidden deep in a nested template;
}

template Foo(T)
{
    alias Bar!(T) Foo;
}

void foo(T)(Foo!(T) x)
{
}

void main()
{
    foo!(int)(2);
}
----
test.d(19): template test.foo(T) does not match any function template
declaration
test.d(19): template test.foo(T) cannot deduce template function from argument
types !(int)(int)


D 1.0 reports the error in Bar as expected:
test.d(5): Error: no property 'ini' for type 'int'
test.d(10): template instance test.Bar!(int) error instantiating


-- 

July 16, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2227


samukha@voliacable.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major




------- Comment #1 from samukha@voliacable.com  2008-07-16 02:38 -------
Raising the severity because this issue considerably complicates the debugging of templates


-- 

December 02, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2227


maxmo@pochta.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |regression




-- 

May 06, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2227


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-05-06 12:47:07 PDT ---
Fixed DMD 2.038.

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