Bug 1273 – final-const-invariant.html html errors

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2007-06-18T01:59:00Z
Last change time
2014-02-14T20:35:33Z
Keywords
spec
Assigned to
nobody
Creator
braddr

Comments

Comment #0 by braddr — 2007-06-18T01:59:15Z
The c++ cast examples use un-quoted < and >'s, For example, the cast away const row shows up as const_castp
Comment #1 by braddr — 2007-06-18T02:12:01Z
Maybe this should be in a separate bug report, but since you can fix 'em both with little effort, the declarations page, http://www.digitalmars.com/d/declaration.html, ought to have the const, final, and invariant StorageClass entries linked up to this explanation page. There's nothing anywhere on the page (other than the left nav pane) to help explain 'em.
Comment #2 by braddr — 2007-06-18T02:22:20Z
http://www.digitalmars.com/d/changelog.html The 2.000 block ought to have the line referring to the new feature linked to the description page.
Comment #3 by matti.niemenmaa+dbugzilla — 2007-06-18T03:37:47Z
Under "Final Storage Class", a struct has a constructor, which is invalid code.
Comment #4 by braddr — 2007-06-18T03:42:33Z
(In reply to comment #3) > Under "Final Storage Class", a struct has a constructor, which is invalid code. Let's just call that a sneak preview. :)
Comment #5 by onlystupidspamhere — 2007-06-18T05:50:46Z
http://d.puremagic.com/issues/show_bug.cgi?id=1273 the doc quotes following code to be valid: int foo(int f) { return f * 3; } invariant int z = foo(2) + 1; <- Error: cannot evaluate foo(2) at compile time but the compiler does not
Comment #6 by matti.niemenmaa+dbugzilla — 2007-06-18T07:42:12Z
It works at global scope, or if foo() is made static: void main() { static int foo(int f) { return f * 3; } invariant int z = foo(2) + 1; } int foo(int f) { return f * 3; } invariant int z = foo(2) + 1;
Comment #7 by kamm-removethis — 2007-06-19T07:36:44Z
The final const invariant page gives this example: invariant(int) y; y = 3; // ok auto q = &y; // q's type is invariant(int)* *q = 4; // error, invariant But the line marked as an error compiles fine. Additionally: static if(is(typeof(y) == int)) // this passes pragma(msg, "y is of type int"); static if(is(invariant(int) == int)) // but this doesn't pragma(msg, "invariant(int) is same as int"); static if(is(typeof(q) == int*)) // this passes again pragma(msg, "&y is of type int*"); Something else, but related static if(is(invariant int == invariant(int))) // passes too, though they're different
Comment #8 by bugzilla — 2012-01-21T16:50:36Z
That page has been dropped.