Thread overview | |||||
---|---|---|---|---|---|
|
April 26, 2017 [Issue 17353] is expression type specialization matching strips const | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17353 Mathias Lang <mathias.lang@sociomantic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathias.lang@sociomantic.co | |m -- |
May 08, 2017 [Issue 17353] is expression type specialization matching strips const | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17353 Nemanja Boric <4burgos@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |4burgos@gmail.com -- |
February 19, 2018 [Issue 17353] is expression type specialization matching strips const | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17353 uplink.coder@googlemail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |uplink.coder@googlemail.com Resolution|--- |INVALID --- Comment #1 from uplink.coder@googlemail.com --- The static if and the static assert are indeed not equivalent since type-system wise const(int[]) is a constant array of mutable ints. The pattern-matching is expression set u to the element type of const(int[]) which is const(int). If you then create the slice type of U you get const(int)[] which is different from const (int[]). So there is no discrepancy. I agree it can be annoying though. -- |
Copyright © 1999-2021 by the D Language Foundation