Bug 20152 – numeric expression should not evaluate to const type

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-08-22T14:29:44Z
Last change time
2024-12-13T19:05:04Z
Assigned to
No Owner
Creator
Илья Ярошенко
Moved to GitHub: dmd#19611 →

Comments

Comment #0 by ilyayaroshenko — 2019-08-22T14:29:44Z
void main() { const double a = 1, b = 2; pragma(msg, typeof(a * b)); } prints `const(double)` expected result: `double`
Comment #1 by ag0aep6g — 2019-08-22T14:40:39Z
This is not a regression. Downgrading to "normal". Ultimately, this is probably an enhancement request, unless the spec states that the type should be `double`.
Comment #2 by robert.schadek — 2024-12-13T19:05:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19611 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB