Bug 5504 – Regression(2.051): Template member functions of a shared class don't compile

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-01-29T12:59:00Z
Last change time
2011-02-06T13:36:53Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
clugdbug
Blocks
5105

Comments

Comment #0 by clugdbug — 2011-01-29T12:59:16Z
shared class C { void foo(T)(T a) {} } void main() { auto c = new C; c.foo(10); } --- Compiles in DMD 2.050. But 2.051 gives: test0.d(9): Error: template test0.C.foo(T) does not match any function template declaration test0.d(9): Error: template test0.C.foo(T) cannot deduce template function from argument types !()(int) Doesn't happen if foo is a normal (non-template) function.
Comment #1 by clugdbug — 2011-02-04T15:03:37Z
Applies to immutable and const, as well as shared. PATCH: https://github.com/donc/dmd/commit/b75f76e4482364564d5dfb8809565b33104482bf
Comment #2 by clugdbug — 2011-02-06T13:36:53Z