[Issue 23674] New: incompatible types for array comparison: string and string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 6 23:54:12 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23674
Issue ID: 23674
Summary: incompatible types for array comparison: string and
string
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: zorael at gmail.com
Manjaro/Arch x86_64, dmd 2.102.0 fetched with install.sh.
Unhelpful error message when comparing an out-of-bounds element of an array
with a value of the same element type.
---
void main()
{
string[2] arr;
assert(arr[2] == string.init);
}
---
onlineapp.d(4): Error: incompatible types for array comparison: `string` and
`string`
--
More information about the Digitalmars-d-bugs
mailing list