https://issues.dlang.org/show_bug.cgi?id=10018
Lionello Lunesu <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME |--- --- Comment #9 from Lionello Lunesu <[email protected]> --- (In reply to yebblies from comment #7) > This seems to work just fine: > > void main() > { > immutable int i = 1; > byte x = i; > } This works now because a call to optimize() will remove the reference to 'i' and replace it with the constant expression. If it's not a constant expression (for example, ?: not known at compile time) then it won't propagate the range. --
