dmd/compiler/test/fail_compilation/fail23773.d
Razvan Nitu 8e9bacf7c7
Add a lowering field for AssignExp to store potential lowerings (#14985)
* Fix Issue 23773 - Add a lowering field for AssignExp to store potential lowerings and use it for array length expressions

* Add LoweredAssignExp AST node
2023-03-31 11:44:48 +03:00

15 lines
256 B
D

// https://issues.dlang.org/show_bug.cgi?id=23773
/*
TEST_OUTPUT:
---
fail_compilation/fail23773.d(14): Error: assignment cannot be used as a condition, perhaps `==` was meant?
---
*/
void main()
{
int i;
int[] arr;
assert(arr.length = i);
}