Issue 10325 - Constraints should be emitted for templated declarations

http://d.puremagic.com/issues/show_bug.cgi?id=10325