Bug 20066 – Assertion on void[] does not compile with -checkaction=context

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-07-19T23:13:02Z
Last change time
2019-08-05T00:53:50Z
Keywords
pull
Assigned to
No Owner
Creator
asumface

Comments

Comment #0 by asumface — 2019-07-19T23:13:02Z
void main() { assert([] is null); } fails to compile: /path/to/dmd.linux/dmd2/linux/bin64/../../src/druntime/import/object.d(4914): Error: cannot implicitly convert expression `valA` of type `void[]` to `char[]` /path/to/dmd.linux/dmd2/linux/bin64/../../src/druntime/import/object.d(4919): Error: cannot implicitly convert expression `valB` of type `void[]` to `char[]` onlineapp.d(3): Error: template instance `object._d_assert_fail!("is", void[], void[])` error instantiating This works: void main() { assert([] is null, ""); }
Comment #1 by dlang-bot — 2019-08-03T20:21:36Z
@wilzbach created dlang/druntime pull request #2721 "Fix Issue 20066 - Assertion on void[] does not compile with -checkaction=context" fixing this issue: - Fix Issue 20066 - Assertion on void[] does not compile with -checkaction=context https://github.com/dlang/druntime/pull/2721
Comment #2 by dlang-bot — 2019-08-05T00:53:50Z
dlang/druntime pull request #2721 "Fix Issue 20066 - Assertion on void[] does not compile with -checkaction=context" was merged into master: - dcaf64c77ab3caef8aa71f5f9f1d4f0945fc7687 by Sebastian Wilzbach: Fix Issue 20066 - Assertion on void[] does not compile with -checkaction=context https://github.com/dlang/druntime/pull/2721