[Issue 14343] Postfix increment doesn't work on structs with immutable member
https://issues.dlang.org/show_bug.cgi?id=14343 Nicolas Sicard dran...@gmail.com changed: What|Removed |Added OS|Mac OS X|All Severity|enhancement |normal --
[Issue 14343] Postfix increment doesn't work on structs with immutable member
https://issues.dlang.org/show_bug.cgi?id=14343 --- Comment #1 from Nicolas Sicard dran...@gmail.com --- The problem doesn't show with the old operator overloading methods: struct S { int i; immutable(Object) o; void opAddAssign(int j) { i += j; } S opPostInc() { ++i; return this; } void opAssign(S other) {} } unittest { S s; ++s; assert(s.i == 1); s++; assert(s.i == 2); } --
[Issue 14343] New: Postfix increment doesn't work on structs with immutable member
https://issues.dlang.org/show_bug.cgi?id=14343 Issue ID: 14343 Summary: Postfix increment doesn't work on structs with immutable member Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: dran...@gmail.com struct S { int i; immutable(Object) o; S opUnary(string op)() { return this; } void opAssign(S other) {} } void main() { S s, t; t = s; // OK ++s; // OK s++; // Error: cannot modify struct s S with immutable members } --
[Issue 14334] (D1 only) Forward reference error with method returning template instance equal to typeof(this)
https://issues.dlang.org/show_bug.cgi?id=14334 --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com --- (In reply to Andrej Mitrovic from comment #4) (In reply to Kenji Hara from comment #3) (In reply to Andrej Mitrovic from comment #2) It's not fixed: http://dpaste.dzfl.pl/734b3b884325 It's using 2.065. Ah I'm soryr, I misread your comment as 2.055.1! :) Sorry even. --
[Issue 14334] (D1 only) Forward reference error with method returning template instance equal to typeof(this)
https://issues.dlang.org/show_bug.cgi?id=14334 --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com --- (In reply to Kenji Hara from comment #3) (In reply to Andrej Mitrovic from comment #2) It's not fixed: http://dpaste.dzfl.pl/734b3b884325 It's using 2.065. Ah I'm soryr, I misread your comment as 2.055.1! :) --
[Issue 14341] [REG 2.067] Crash with -O -release -inline after sort and map!(to!string)
https://issues.dlang.org/show_bug.cgi?id=14341 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added CC||thecybersha...@gmail.com --- Comment #1 from Vladimir Panteleev thecybersha...@gmail.com --- Introduced in https://github.com/D-Programming-Language/dmd/pull/4415 --
[Issue 1759] Closures and With Statements
https://issues.dlang.org/show_bug.cgi?id=1759 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/38d906b8366a881d19a7f9267b536d372409da31 fix Issue 1759 - Closures and With Statements https://github.com/D-Programming-Language/dmd/commit/a1d857a4f46aa21722712c3014fd40c978ee28c5 Merge pull request #4518 from 9rnsr/fix1759 Issue 1759 - Closures and With Statements --
[Issue 14344] [REG2.067] Wrong opBinary call in construction
https://issues.dlang.org/show_bug.cgi?id=14344 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a39502dad3138bc911a7c092a38bc095dbd91227 fix Issue 14344 - Wrong opBinary call in construction https://github.com/D-Programming-Language/dmd/commit/1139c4298507a1aa0676e76059d491c6158a6f74 Merge pull request #4519 from 9rnsr/fix14344 [REG2.067] Issue 14344 - Wrong opBinary call in construction --
[Issue 13983] RefCounted needs to be pure, @safe, nothrow
https://issues.dlang.org/show_bug.cgi?id=13983 weaselcat r9shacklef...@gmail.com changed: What|Removed |Added CC||r9shacklef...@gmail.com --- Comment #1 from weaselcat r9shacklef...@gmail.com --- ping, this requires a safe wrapper around malloc/free right? --
[Issue 14344] [REG2.067] Wrong opBinary call in construction
https://issues.dlang.org/show_bug.cgi?id=14344 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 8234] symbols used in CTFE affect the function literal type
https://issues.dlang.org/show_bug.cgi?id=8234 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cd3cd0dc66dbc40b9666a3b2b2b8efde8c0e0216 fix Issue 8234 - symbols used in CTFE affect the function literal type https://github.com/D-Programming-Language/dmd/commit/c420fa1f642bfcb2aa0ba4bf7778b9c34465131b Merge pull request #4517 from 9rnsr/fix8234 Issue 8234 - symbols used in CTFE affect the function literal type --
[Issue 12811] GC-allocated closure for calling instance function in filter
https://issues.dlang.org/show_bug.cgi?id=12811 --- Comment #2 from bearophile_h...@eml.cc --- (In reply to Kenji Hara from comment #1) 'filter' will lazily evaluate the given array outside of the 'spam' function, so the lambda 'i = bar(i)' needs to capture 'this' variable to call member function 'bar'. It will make a closure allocation. Thank you for the answer. We'll have to add some escape analysis to turn some closure heap allocations into stack allocations. --
[Issue 14332] support with statement and :
https://issues.dlang.org/show_bug.cgi?id=14332 --- Comment #3 from deadalnix deadal...@gmail.com --- if/else/while actually DO something. With simply change the identifier resolution rules. In fact, thinking about it, it should even be required that with is a statement. --
[Issue 14347] New: functions in std.string need upgrading to support std.uni.nelSep line endings
https://issues.dlang.org/show_bug.cgi?id=14347 Issue ID: 14347 Summary: functions in std.string need upgrading to support std.uni.nelSep line endings Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: bugzi...@digitalmars.com Some have already been fixed, but these remain: chomp() detab() entab() column() --
[Issue 14346] is-expression dependent on instantiation order
https://issues.dlang.org/show_bug.cgi?id=14346 --- Comment #2 from Ketmar Dark ket...@ketmar.no-ip.org --- ah. `usize` is simply an alias for `size_t`. sorry. --
[Issue 14346] is-expression dependent on instantiation order
https://issues.dlang.org/show_bug.cgi?id=14346 Ketmar Dark ket...@ketmar.no-ip.org changed: What|Removed |Added CC||ket...@ketmar.no-ip.org --- Comment #1 from Ketmar Dark ket...@ketmar.no-ip.org --- seems that there is some bug with template merging. change your template declarations to this: template isConvertibleToInstanceOf(alias From, alias To, usize dummy=__LINE__) template isConvertibleToInstanceOf(From, alias To, usize dummy=__LINE__) and you will never see pragma output from second `static if`. --
[Issue 4909] Two suggestions for std.algorithm.schwartzSort()
https://issues.dlang.org/show_bug.cgi?id=4909 --- Comment #15 from Ketmar Dark ket...@ketmar.no-ip.org --- (In reply to Andrei Alexandrescu from comment #14) We won't change names without very good reasons. being *really* hard to remember IS a good reason to change the name. it's a human psychology again: hard to remember is unattractive, easy to remember is attractive. seems that D is intentionally unattractive. and name changing requests are blocked until people wrote enough code, so that such requests can be finally rejected with that ship is sailed verdict. --
[Issue 14341] [REG 2.067] Crash with -O -release -inline after sort and map!(to!string)
https://issues.dlang.org/show_bug.cgi?id=14341 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Component|Phobos |DMD --
[Issue 14341] [REG 2.067] Crash with -O -release -inline after sort and map!(to!string)
https://issues.dlang.org/show_bug.cgi?id=14341 --- Comment #2 from Kenji Hara k.hara...@gmail.com --- (In reply to Vladimir Panteleev from comment #1) Introduced in https://github.com/D-Programming-Language/dmd/pull/4415 This is a dup of issue 14220, but its fix is not yet cherry-picked in 2.067 branch. --
[Issue 14345] New: Proxy doesn't support multidimensional structures
https://issues.dlang.org/show_bug.cgi?id=14345 Issue ID: 14345 Summary: Proxy doesn't support multidimensional structures Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: vlevenf...@gmail.com opDollar (size_t)() exists and opIndex* seems to support multiple dimensions but I don't see opSlice (size_t)(...) --
[Issue 14341] [REG 2.067] Crash with -O -release -inline after sort and map!(to!string)
https://issues.dlang.org/show_bug.cgi?id=14341 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #3 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4520 --
[Issue 14344] [REG2.067] Wrong opBinary call in construction
https://issues.dlang.org/show_bug.cgi?id=14344 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4519 --
[Issue 14346] New: is-expression dependent on instantiation order
https://issues.dlang.org/show_bug.cgi?id=14346 Issue ID: 14346 Summary: is-expression dependent on instantiation order Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: schue...@gmx.net This is a really weird bug. Here's how far I could reduce it: struct Validate() { this(string ) { } } template isConvertibleToInstanceOf(alias From, alias To) { enum isConvertibleToInstanceOf = isConvertibleToInstanceOf!(typeof(From), To); } template isConvertibleToInstanceOf(From, alias To) { enum isConvertibleToInstanceOf = is(From : To!Args, Args...); } template Validation() { void validate() { // run validators for members foreach(member; __traits(allMembers, typeof(this))) { foreach(UDA; __traits(getAttributes, mixin(member))) { // THE FOLLOWING LINE IS MAGIC static if(isConvertibleToInstanceOf!(UDA, Validate)) { } // --- } } // run validators for entire object foreach(UDA; __traits(getAttributes, typeof(this))) { // THE RESULT OF THIS IS-EXPR DEPENDS ON THE LINE ABOVE: static if(isConvertibleToInstanceOf!(UDA, Validate)) pragma(msg, isConvertibleToInstanceOf: , typeof(UDA)); } } } struct EmbeddedType { } EmbeddedType Embedded; @Embedded class Address { @Validate!()(invalid country) string country; mixin Validation; } When the first `static if` is there, the `pragma` prints isConvertibleToInstanceOf: EmbeddedType. But if it is removed or commented out, the `pragma` isn't called; evidently the second `static if` fails. --
[Issue 14344] New: [REG2.067] Wrong opBinary call in construction
https://issues.dlang.org/show_bug.cgi?id=14344 Issue ID: 14344 Summary: [REG2.067] Wrong opBinary call in construction Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: k.hara...@gmail.com Issue case: struct CSSScale { CSSScale opBinary(string op)(CSSScale v) { static assert(op != =);// line 3 assert(0); } } struct CSSScaleMix { CSSScale cssScaleA; alias cssScaleA this; } class TextHighlighter { CSSScaleMix height () {assert(0);} void update() { CSSScale height = this.height;// line 16 } } Output: test.d(3): Error: static assert (= != =) is false test.d(16):instantiated from here: opBinary!= The regression introduced in: https://github.com/D-Programming-Language/dmd/pull/4054 --