[Issue 5770] Template constructor bypass access check
https://issues.dlang.org/show_bug.cgi?id=5770 --- Comment #6 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/4cd6985729ae349d869624146c5e57ec1fe8ff2b fix Issue 5770 - Template constructor bypass access check It had caused by the incomplete implementation of access check. Most part of `access.c` was old code from ancient D ages. https://github.com/D-Programming-Language/dmd/commit/b2e2f80d365728f54f602efa2cb56bdc87c69b7a Merge pull request #4558 from 9rnsr/fix5770 Issue 5770 - Template constructor bypass access check --
[Issue 14423] struct destructors not finalized for AA values
https://issues.dlang.org/show_bug.cgi?id=14423 Rainer Schuetze r.sagita...@gmx.de changed: What|Removed |Added Keywords||pull CC||r.sagita...@gmx.de --- Comment #1 from Rainer Schuetze r.sagita...@gmx.de --- https://github.com/D-Programming-Language/druntime/pull/1212 --
[Issue 14440] New: CTFE Regression: Wrong values set in a matrix constructor.
https://issues.dlang.org/show_bug.cgi?id=14440 Issue ID: 14440 Summary: CTFE Regression: Wrong values set in a matrix constructor. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: devw...@gmail.com Created attachment 1512 -- https://issues.dlang.org/attachment.cgi?id=1512action=edit A reduced test case. This is a strange bug. In my dstruct library, I use a constructor which takes an array of arguments with a fixed size for creating matrices in my library. So you can write a constructor like this. auto matrix = Matrix!(int, 3, 3)(1, 2, 3, 4, 5, 6, 7, 8, 9); So the matrix can be created on the stack directly with no heap allocation, and then it offers operations like addition and multiplication, etc. One of my unit tests caught a CTFE regression where 'enum' is used instead of auto. So when the matrix is created at runtime, the 2D array held within rightly becomes [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. However, when 'enum' is used, the array becomes [[7, 8, 9], [7, 8, 9], [7, 8, 9]]. This used to work just fine in 2.066. I have attached a reduced test case to this bug report. Curiously, I tried using a function instead of a constructor in a struct, and the function worked. So the bug seems to be somehow tied to the constructor. --
[Issue 14440] [REG2.067] CTFE Regression: Wrong values set in a matrix constructor.
https://issues.dlang.org/show_bug.cgi?id=14440 Martin Krejcirik m...@krej.cz changed: What|Removed |Added CC||m...@krej.cz Hardware|x86_64 |All Summary|CTFE Regression: Wrong |[REG2.067] CTFE Regression: |values set in a matrix |Wrong values set in a |constructor.|matrix constructor. --
[Issue 14441] New: Strange error with string ctor
https://issues.dlang.org/show_bug.cgi?id=14441 Issue ID: 14441 Summary: Strange error with string ctor Product: D Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: temta...@gmail.com auto s = string(`foo`); Error: function expected before (), not string of type string It should be accepted because all built-in types has a ctor. For example auto a = int(10); works --
[Issue 14440] [REG2.067] [CTFE] Wrong values set in a matrix constructor
https://issues.dlang.org/show_bug.cgi?id=14440 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 14440] [REG2.067] [CTFE] Wrong values set in a matrix constructor
https://issues.dlang.org/show_bug.cgi?id=14440 --- 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/7b64c8d9e45c93be287c8a5b0f5f14ec566cebaa fix Issue 14440 - [CTFE] Wrong values set in a matrix constructor https://github.com/D-Programming-Language/dmd/commit/444cc4e4cd4246395c2a12058a8de8ec90f134ed Merge pull request #4583 from 9rnsr/fix14440 [REG2.067] Issue 14440 - [CTFE] Wrong values set in a matrix constructor --
[Issue 14440] [REG2.067] CTFE Regression: Wrong values set in a matrix constructor.
https://issues.dlang.org/show_bug.cgi?id=14440 ag0ae...@gmail.com changed: What|Removed |Added Keywords||CTFE, wrong-code CC||ag0ae...@gmail.com OS|Linux |All --- Comment #1 from ag0ae...@gmail.com --- Reduced further: struct Matrix { int[1][2] array2D; this(int dummy) { array2D[0][0] = 1; array2D[1][0] = 2; /* writes over array2D[0][0] */ } } static assert(Matrix(0).array2D[0][0] == 1); /* fails */ --
[Issue 14363] [SDC] Error with inheriting nested classes in nested functions
https://issues.dlang.org/show_bug.cgi?id=14363 --- Comment #7 from Kenji Hara k.hara...@gmail.com --- (In reply to deadalnix from comment #6) (In reply to Shammah Chancellor from comment #5) I'm not sure about that part of SDC. I will investigate and see if deadalnix has some input here. SDC does it by sticking one context in the base and one context in the child. It's definitely different. dmd inserts at most only one context over the all derived classes. The second context pointer in the child class need to be error in SDC. --
[Issue 14421] Variadic args array force on heap
https://issues.dlang.org/show_bug.cgi?id=14421 --- Comment #5 from yebblies yebbl...@gmail.com --- (In reply to John Colvin from comment #4) (In reply to yebblies from comment #3) Is there a reason you can't overload and forward the variadic version to the non-variadic after calling dup? I don't understand how that would help. What I'm concerned about is if making the variadic array argument creates a GC allocation, then the .dup makes another one. If you have this: char[] foo(char[] args...) { return foo(args.dup); } char[] foo(char[] args) { return args; } void main() { foo('a', 'b', 'c'); // this will call first overload, and dup foo(['a', 'b', 'c']); // this will call second, no dup } The array will only be copied if the variadic version is called. --
[Issue 14421] Variadic args array force on heap
https://issues.dlang.org/show_bug.cgi?id=14421 --- Comment #4 from John Colvin john.loughran.col...@gmail.com --- (In reply to yebblies from comment #3) Is there a reason you can't overload and forward the variadic version to the non-variadic after calling dup? I don't understand how that would help. What I'm concerned about is if making the variadic array argument creates a GC allocation, then the .dup makes another one. --
[Issue 14440] [REG2.067] [CTFE] Wrong values set in a matrix constructor
https://issues.dlang.org/show_bug.cgi?id=14440 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Summary|[REG2.067] CTFE Regression: |[REG2.067] [CTFE] Wrong |Wrong values set in a |values set in a matrix |matrix constructor. |constructor --- Comment #2 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4583 --
[Issue 14363] [SDC] Error with inheriting nested classes in nested functions
https://issues.dlang.org/show_bug.cgi?id=14363 --- Comment #8 from deadalnix deadal...@gmail.com --- (In reply to Kenji Hara from comment #7) (In reply to deadalnix from comment #6) (In reply to Shammah Chancellor from comment #5) I'm not sure about that part of SDC. I will investigate and see if deadalnix has some input here. SDC does it by sticking one context in the base and one context in the child. It's definitely different. dmd inserts at most only one context over the all derived classes. The second context pointer in the child class need to be error in SDC. I see no reason for this limitation. --
[Issue 14436] Optimizer fails to remove comparison loop when comparing array against null
https://issues.dlang.org/show_bug.cgi?id=14436 --- 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/7660158f16b9c988d8ff16592ee442051ea95ffa Fix Issue 14436 - Optimizer fails to remove comparison loop when comparing array against null https://github.com/D-Programming-Language/dmd/commit/6f5a3cde5778e263d53d49f4546b668652ca89ae Merge pull request #4574 from yebblies/issue14436 Issue 14436 - Optimizer fails to remove comparison loop when comparing array against null --
[Issue 14436] Optimizer fails to remove comparison loop when comparing array against null
https://issues.dlang.org/show_bug.cgi?id=14436 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --