D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6704 - CommaExpression as an IfCondition
Summary: CommaExpression as an IfCondition
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2011-09-20 23:12 UTC by Kasumi Hanazuki
Modified: 2012-01-21 00:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kasumi Hanazuki 2011-09-20 23:12:02 UTC
The following code is valid according to the spec but rejected by dmd with the error:
  test.d(3): if (v; e) is deprecated, use if (auto v = e)

Tested with DMD v2.055

----

void main() {
  int a;
  if(a, true) { }
}