[Issue 21765] New: Assignment-as-condition error with checkaction=context
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 25 02:19:34 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21765
Issue ID: 21765
Summary: Assignment-as-condition error with checkaction=context
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: moonlightsentinel at disroot.org
-------------------------------
ref int boo();
void main()
{
assert(( boo() = 2) == 2);
}
-------------------------------
Only with -checkaction=context:
checkaction.d(5): Error: assignment cannot be used as a condition, perhaps `==`
was meant?
--
More information about the Digitalmars-d-bugs
mailing list