[Issue 13732] Regular templates can use "template this", and they allow any type to be passed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 16 14:25:44 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=13732

--- Comment #7 from Dlang Bot <dlang-bot at dlang.rocks> ---
@ntrel created dlang/dmd pull request #14447 "Fix Issue 13732 - non-member
templates can use "template this"" fixing this issue:

- Fix Issue 13732 - non-member templates can use "template this"

  Error if a TemplateThisParameter is declared where `typeof(this)` would
  be an error.
  Error if a TemplateThisParameter is passed a type that doesn't convert
  to `const typeof(this)`.

  Note: This is done with a dummy specialization, which causes the correct
  semantic error messages even for mixin and may be more efficient than
  checking this in dtemplate.d.

https://github.com/dlang/dmd/pull/14447

--


More information about the Digitalmars-d-bugs mailing list