https://issues.dlang.org/show_bug.cgi?id=22053
Issue ID: 22053
Summary: `catch {` not rejected while in a template
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
/////// test.d ///////
void foo()()
{
try {}
catch
assert(false);
}
alias goo = foo!();
//////////////////////
This catch syntax (without specifying an exception) has been deprecated and is
currently rejected when the code is not in a function template. However, the
compiler does not reject it when it's inside a template, even when the template
is instantiated.
--