Bug 2227 – Error forbidding a function template instantiation is not reported

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-07-15T06:46:00Z
Last change time
2015-06-09T01:19:59Z
Keywords
diagnostic
Assigned to
nobody
Creator
samukha

Comments

Comment #0 by samukha — 2008-07-15T06:46:28Z
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
Comment #1 by samukha — 2008-07-16T02:38:42Z
Raising the severity because this issue considerably complicates the debugging of templates
Comment #2 by clugdbug — 2010-05-06T12:47:07Z
Fixed DMD 2.038.