December 30, 2005 DDoc bug with const assignment in static constructor | ||||
---|---|---|---|---|
| ||||
The following code will show this behavior: ##### foo.d # /// DDoc bug example # module foo; # # /// some constants # const int ONE = 1 , # TWO = 2 , # THREE , # FOUR , # FIVE ; # # /// module constructor # static this () { # THREE = 3 ; # FOUR = 4 ; # FIVE = 5 ; # } Run the command line "dmd -c -o- -D foo" and then open the resulting "foo.html" file. The error is in the listings for THREE, FOUR, and FIVE -- the constants whose values were set from the module constructor. They do not reveal the const attribute, whereas ONE and TWO have theirs proudly displayed. -- Chris Sauls |
Copyright © 1999-2021 by the D Language Foundation