www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2227] New: Error forbidding a function template instantiation is not reported

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


-- 
Jul 15 2008
next sibling parent d-bugmail puremagic.com writes:
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


-- 
Jul 16 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2227


maxmo pochta.ru changed:

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




-- 
Dec 02 2008
prev sibling parent d-bugmail puremagic.com writes:
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: -------
May 06 2010