Comparing slice to an Array in assert
madwebness
madwebness at noreply.noreply
Tue Jun 11 09:48:36 UTC 2024
On Tuesday, 11 June 2024 at 09:29:05 UTC, madwebness wrote:
> My version that runs:
Ran the code exactly as you posted. It works and I found the
issue. Apparently, if I add =* to the end of the last element,
the assertion fails with the error.
```
auto words = ["HELLO", "world", "hi", "ENDOFTHERUNWAY=*"];
```
results in:
```
core.exception.AssertError at ./code.d(23): Assertion failure
----------------
??:? _d_assertp [0x360904]
??:? _Dmain [0x3073c3]
```
I don't understand why, isn't it supposed to be treated as a
string?
More information about the Digitalmars-d-learn
mailing list