digitalmars.D.bugs - [Issue 4561] New: D2 Language Docs: http://www.digitalmars.com/d/2.0/function.html
- d-bugmail puremagic.com (64/64) Aug 01 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4561
- d-bugmail puremagic.com (11/11) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4561
http://d.puremagic.com/issues/show_bug.cgi?id=4561 Summary: D2 Language Docs: http://www.digitalmars.com/d/2.0/function.html Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: www.digitalmars.com AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com 14:48:02 PDT --- "Function Inheritance and Overriding" The 4th example is trying to import std.hiddenfunc. The compiler can't find that file (I'm guessing this was moved someplace else). This will need updating. "Overload Sets" There are three code example modules here: module A; void foo() { } void foo(long i) { } module B; class C { } void foo(C) { } void foo(int i) { } import A; import B; void bar(C c) { foo(); // calls A.foo() foo(1L); // calls A.foo(long) foo(c); // calls B.foo(C) foo(1,2); // error, does not match any foo foo(1); // error, matches A.foo(long) and B.foo(int) A.foo(1); // calls A.foo(long) } I am getting an additional error on line: foo(1L); error: new.d(7): Error: B.foo at B.d(4) conflicts with A.foo at A.d(3) a.foo(long) and b.foo(int) conflict when passing long as an argument. But seeing as calling them with an int will conflict as well, I expect this to be the normal behavior. If that is so, change that line to: foo(1L); // error, matches A.foo(long) and B.foo(int) Title: "Typesafe variadic functions" In the third example, change these lines: Foo g = new Foo(3, "abc"); test(1, 4, "def"); to: Foo g = new Foo(3, "abc".dup); test(1, 4, "def".dup); for the example to compile. "Local Variables" "It is an error to use a local variable without first assigning it a value." This sounds like C semantics to me. But D has all of its local variables initialized to their default values, so I'm not sure what this statement means. "It is an error to declare a local variable that is never referred to." I've never had such an error and neither a warning. Can someone elaborate? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 01 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4561 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED 13:29:07 PST --- These have been fixed in other bug reports. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 29 2012