[Issue 19096] [REG 2.061] Proper error messages are not shown for templates that go beyond two deep, wrongly says no template overload matches

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 20 06:07:41 UTC 2018


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

--- Comment #1 from Joakim <dbugz at joakim.fea.st> ---
Ah, I finally figured out why, if I comment out the last constraint on toImpl,
`is(typeof(parse!T(value)))`, I get the right error with `dmd -version=broken
shadow.d`:

frontend.d(12): Error: variable anydigits is shadowing variable
frontend.parse!(real, string).parse.anydigits     frontend.d(35): Error:
template instance `frontend.parse!(real, string)` error instantiating          
           frontend.d(42):        instantiated from here: toImpl!(real, string)

I'm unsure what that last constraint is supposed to accomplish, make sure
parse() compiles and returns a type? It still used to print a useful error up
till 2.060, but I'll leave it up to someone who knows the compiler better
whether this should be considered a regression.

--


More information about the Digitalmars-d-bugs mailing list