[Issue 21711] Concatenating a function pointer with a string should be an error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 14 11:30:25 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21711

ag0aep6g <ag0aep6g at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com

--- Comment #1 from ag0aep6g <ag0aep6g at gmail.com> ---
The issue seems to be that constant folding ignores the type. Test case without
a function pointer:

----
void main()
{
    immutable void* x = cast(void*) 91;
    string s = x ~ ""; /* accepted; should be rejected */
}
----

--


More information about the Digitalmars-d-bugs mailing list