D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20152 - numeric expression should not evaluate to const type
Summary: numeric expression should not evaluate to const type
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-22 14:29 UTC by Илья Ярошенко
Modified: 2024-12-13 19:05 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Илья Ярошенко 2019-08-22 14:29:44 UTC
void main()
{	
	const double a = 1, b = 2;
	pragma(msg, typeof(a * b));
}

prints `const(double)`

expected result: `double`
Comment 1 ag0aep6g 2019-08-22 14:40:39 UTC
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 dlangBugzillaToGithub 2024-12-13 19:05:04 UTC
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