Bug 20322 – checkaction=context fails for wstring/dstring arguments
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-10-26T11:08:16Z
Last change time
2019-10-28T15:19:46Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2019-10-26T11:08:16Z
Some unittests from core.internal.unittest.d fail to compile with -unittest -checkaction=context, e.g:
src/core/internal/dassert.d(31): Error: forward reference to inferred return type of function call function () @trusted => cast(string)buffer()
src/core/internal/dassert.d(116): Error: cannot implicitly convert expression idup(s) of type wstring to string
src/core/internal/dassert.d(216): Error: template instance core.internal.dassert.miniFormat!wstring error instantiating
src/core/internal/dassert.d(17): instantiated from here: miniFormatFakeAttributes!wstring
src/core/internal/utf.d(885): instantiated from here: _d_assert_fail!("==", wstring, wstring)
src/core/internal/dassert.d(31): Error: forward reference to inferred return type of function call function () @trusted => cast(string)buffer()
src/core/internal/dassert.d(116): Error: cannot implicitly convert expression idup(s) of type dstring to string
src/core/internal/dassert.d(216): Error: template instance core.internal.dassert.miniFormat!dstring error instantiating
src/core/internal/dassert.d(17): instantiated from here: miniFormatFakeAttributes!dstring
src/core/internal/utf.d(887): instantiated from here: _d_assert_fail!("==", dstring, dstring)
src/core/internal/dassert.d(31): Error: forward reference to inferred return type of function call function () @trusted => cast(string)buffer()
src/core/internal/dassert.d(116): Error: cannot implicitly convert expression idup(s) of type wstring to string
The is caused by miniFormat assuming that the result of a string concenation is always a string (not e.g. a wstring)
Comment #1 by dlang-bot — 2019-10-26T11:28:44Z
@MoonlightSentinel created dlang/druntime pull request #2840 "Fix Issue 20322 - checkaction=context fails for wstring/dstring arguments" fixing this issue:
- Fix Issue 20322 - checkaction=context fails for wstring/dstring arguments
https://github.com/dlang/druntime/pull/2840
Comment #2 by dlang-bot — 2019-10-28T15:19:46Z
dlang/druntime pull request #2840 "Fix Issue 20322 - checkaction=context fails for wstring/dstring arguments" was merged into master:
- 10738baeb93dfa36019ad4fbb3d936ce32b9b23a by Florian Brandt:
Fix Issue 20322 - checkaction=context fails for wstring/dstring arguments
https://github.com/dlang/druntime/pull/2840