2247 – bad header file generated for if (auto o = ...) {}

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2247 - bad header file generated for if (auto o = ...) {}
Summary: bad header file generated for if (auto o = ...) {}
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2008年07月25日 18:51 UTC by Koroskin Denis
Modified: 2014年02月24日 15:33 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Koroskin Denis 2008年07月25日 18:51:08 UTC
int test(T)(T t)
{
	if (auto o = cast(Object)t) return 1;
	return 0;
}
generates the following
// D import file generated from 'test.d'
template test(T)
{
int test(T t)
{
if (o;cast(Object)t)
return 1;
return 0;
}
}
which is a deprecated syntax.
Comment 1 Walter Bright 2008年08月14日 03:01:27 UTC
Fixed dmd 1.034 and 2.018


AltStyle によって変換されたページ (->オリジナル) /