[Issue 16532] Add "namespace" Keyword?
https://issues.dlang.org/show_bug.cgi?id=16532 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #3 from b2.t...@gmx.com --- (In reply to Jack from comment #2) > Exactly, name spaces are supported but only through an extern. If I want to > write D code with namespaces it isn't possible. Hence a lack of completeness. > > You can't use a template without a parameter? > > template Name() > { > enum a = 2; > enum b = 3; > } > > writeln(Name.a, Name.b); // error Name has no property a or b You must alias it to create an instance. alias name = Name!(); and in the code use this alias. But you know, namespaces will never be added. D has modules, end of story. Ask on the news group and you'll see...You can even close this issue. --
[Issue 16633] Case where an alias this is tried before the object itself
https://issues.dlang.org/show_bug.cgi?id=16633 Steven Schveighofferchanged: What|Removed |Added Summary|Case where an alias this is |Case where an alias this is |tried before the right |tried before the object |member |itself --- Comment #1 from Steven Schveighoffer --- I think the summary was incorrect, please revert if I was wrong. --
[Issue 16633] Case where an alias this is tried before the right member
https://issues.dlang.org/show_bug.cgi?id=16633 ag0ae...@gmail.com changed: What|Removed |Added Keywords||wrong-code CC||ag0ae...@gmail.com --
[Issue 16633] New: Case where an alias this is tried before the right member
https://issues.dlang.org/show_bug.cgi?id=16633 Issue ID: 16633 Summary: Case where an alias this is tried before the right member Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: b2.t...@gmx.com class Item { alias children this; Item[] children; void populate() { children ~= new Item; // Item is seen as [] assert(children.length == 1); } } void main() { Item root = new Item; root.populate; } https://forum.dlang.org/thread/wcxdarfpfassnjaak...@forum.dlang.org --
[Issue 11119] Alias declaration cannot see forward-referenced symbol in mixed-in template
https://issues.dlang.org/show_bug.cgi?id=9 anonymous4changed: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=1170 --
[Issue 1170] Cannot forward reference a type defined in a MixinStatement
https://issues.dlang.org/show_bug.cgi?id=1170 anonymous4changed: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=9 --
[Issue 16632] "for" statement treats scoped block in increment section as lambda
https://issues.dlang.org/show_bug.cgi?id=16632 Steven Schveighofferchanged: What|Removed |Added Hardware|x86_64 |All Summary|"for" statement issue |"for" statement treats ||scoped block in increment ||section as lambda OS|Windows |All Severity|enhancement |minor --
[Issue 16632] "for" statement issue
https://issues.dlang.org/show_bug.cgi?id=16632 Steven Schveighofferchanged: What|Removed |Added Summary|"for" statemenet issue |"for" statement issue --
[Issue 16532] Add "namespace" Keyword?
https://issues.dlang.org/show_bug.cgi?id=16532 --- Comment #2 from Jack--- Exactly, name spaces are supported but only through an extern. If I want to write D code with namespaces it isn't possible. Hence a lack of completeness. You can't use a template without a parameter? template Name() { enum a = 2; enum b = 3; } writeln(Name.a, Name.b); // error Name has no property a or b --
[Issue 16632] New: "for" statemenet issue
https://issues.dlang.org/show_bug.cgi?id=16632 Issue ID: 16632 Summary: "for" statemenet issue Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: razvan.nitu1...@gmail.com How should the compiler treat this code? int j; for({j=2; int d = 3; } j+d<7; {j++; d++;}) { } A discussion regarding this code can be found at: http://forum.dlang.org/post/nud21i$o29$1...@digitalmars.com --
[Issue 16631] Program crash when a version activates a method defined in a static library
https://issues.dlang.org/show_bug.cgi?id=16631 --- Comment #1 from b2.t...@gmx.com --- Created attachment 1621 --> https://issues.dlang.org/attachment.cgi?id=1621=edit reproduce the bug (posix) --
[Issue 16631] New: Program crash when a version activates a method defined in a static library
https://issues.dlang.org/show_bug.cgi?id=16631 Issue ID: 16631 Summary: Program crash when a version activates a method defined in a static library Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: b2.t...@gmx.com A program crashes when it's linked with a static library and if a version specification is used to activate the protected method of a class. reproduction: === lib.d === module lib; class Foo { protected void bug(){} protected version(bug) void conditionalBug(){} void test() {bug;} } = === main.d === module main; import lib; void main() { (new Foo).test; } == === test.sh dmd lib.d -lib dmd main.d lib.a -version=bug ./main output: ./test.sh : ligne 3 : 3096 Erreur de segmentation ./main This is caused by the front end because the same error appends with latest stable LDC. Latest stable DMD is affected, latest beta too. --
[Issue 9275] [GC] removeRoot hits assert(0) instead of being a no-op (as documented)
https://issues.dlang.org/show_bug.cgi?id=9275 --- Comment #3 from Nemanja Boric <4bur...@gmail.com> --- tests: https://github.com/dlang/druntime/pull/1679 --
[Issue 16630] New: Compile errors with std.traits.arity and std.traits.ParameterStorageClassTuple
https://issues.dlang.org/show_bug.cgi?id=16630 Issue ID: 16630 Summary: Compile errors with std.traits.arity and std.traits.ParameterStorageClassTuple Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: goldmax3...@gmail.com This code import std.traits; class X { @property auto prop() const { struct Iter {} return Iter(); } } pragma(msg, ParameterStorageClassTuple!(X.prop)); gives compile error: /opt/compilers/dmd2/include/std/traits.d(1016): Error: string slice [1 .. 0] is out of bounds /opt/compilers/dmd2/include/std/traits.d(1016): Error: string slice [1 .. 0] is out of bounds /d57/f615.d(11): Error: template instance std.traits.ParameterStorageClassTuple!(prop) error instantiating /d57/f615.d(11):while evaluating pragma(msg, ParameterStorageClassTuple!(prop)) Similar error with pragma(msg, arity!(X.prop)); /opt/compilers/dmd2/include/std/traits.d(1699): Error: string index 0 is out of bounds [0 .. 0] /opt/compilers/dmd2/include/std/traits.d(1699): Error: string index 0 is out of bounds [0 .. 0] /opt/compilers/dmd2/include/std/traits.d(1751): Error: template instance std.traits.functionLinkage!() error instantiating /opt/compilers/dmd2/include/std/traits.d(970):instantiated from here: variadicFunctionStyle!(prop) /opt/compilers/dmd2/include/std/traits.d(1756): Error: string index 18446744073709551593 is out of bounds [0 .. 0] /opt/compilers/dmd2/include/std/traits.d(1756): Error: array index -23 is out of bounds [0..0] /d112/f0.d(11):while looking for match for arity!(prop) /d112/f0.d(11):while evaluating pragma(msg, arity!(prop)) --