druntime 2.087 regression? (was: Old codebase stops compiling at 2.087)
James Blachly
james.blachly at gmail.com
Sun Nov 17 15:45:42 UTC 2019
TL;DR druntime regression?
https://gist.github.com/jblachly/78c5762bbfea65b09e7a1417ad763019
---
Our team has an older codebase that compiled fine up until frontend
version 2.087 (builds with 2.086.1). Now, compiler (DMD2 and LDC2)
complains about implicit conversion of shared(AA) to const(shared(AA)).
The codebase is private (could possibly make it public soon) but the
error involves an AA inside a shared struct.
```
/home/james/dmd2.087/dmd2/linux/bin64/../../src/druntime/import/object.d(3453,36):
Error: cannot implicitly convert expression aa of type
shared(GSeqAllele[string]) to const(shared(GSeqAllele)[string])
source/polytyper/gseq.d(231,33): Error: template instance
`object.values!(shared(GSeqAllele[string]), shared(GSeqAllele), string)`
error instantiating
/home/james/dmd2.087/dmd2/linux/bin64/../../src/druntime/import/object.d(3402,36):
Error: cannot implicitly convert expression aa of type
shared(GSeqAllele[string]) to const(shared(GSeqAllele)[string])
source/polytyper/gseq.d(280,35): Error: template instance
`object.keys!(shared(GSeqAllele[string]), shared(GSeqAllele), string)`
error instantiating
```
(line breaks added for clarity)
The two triggering lines both iterate over a built-in AA
gseq.d:231: foreach (a; this.alleles.values)
gseq.d:208: foreach (key; this.alleles.keys)
Looking at the changelog for 2.087 (
https://dlang.org/changelog/2.087.0.html ) I do not see any obvious
culprits. git blame suggests this is the responsible commit:
https://github.com/dlang/druntime/commit/af86e7db58f4b792e45bdc3ee43c17aadc9d54ab#diff-a68e58fcf0de5aa198fcaceafe4e8cf9L3430-R3454
From this change, it looks like the runtime now cannot handle a shared
AA -- is this right? A minimal reproducible example is here:
https://gist.github.com/jblachly/78c5762bbfea65b09e7a1417ad763019
Thanks in advance for help
James
PS: Why is this commit ("object: Declare private struct AA and fix aaA
function signatures ") not mentioned in the changelog?
More information about the Digitalmars-d-learn
mailing list