Bug 15254 – is expression compares string sub-type equal to an array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-28T11:00:37Z
Last change time
2022-10-13T07:57:41Z
Assigned to
No Owner
Creator
Martin Nowak
Comments
Comment #0 by code — 2015-10-28T11:00:37Z
cat > bug.d << CODE
struct S
{
string s;
alias s this;
}
static assert(!is(S == U[], U)); // shouldn't be true
static assert(is(S : U[], U));
CODE
dmd -c bug
----
This was the actual cause for issue 15168.
Comment #1 by steven_kladitis — 2015-11-02T21:36:07Z
1.d
------
void main() {}
------
try to compile in widows and I get.
--> 1.d: Error: module 1 has non-identifier characters in filename, use module declaration instead
a1.d
-----
void main() {}
--------
no errors during compile.
dmd 2.069.rc2
Comment #2 by razvan.nitu1305 — 2022-10-13T07:57:41Z