Skip to content

Commit

Permalink
Merge pull request #4577 from kinke/merge_stable
Browse files Browse the repository at this point in the history
Merge upstream stable
  • Loading branch information
kinke committed Feb 8, 2024
2 parents 9ce6063 + 3269302 commit 3c21924
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LDC master

#### Big news
- Frontend, druntime and Phobos are at version [2.107.0](https://dlang.org/changelog/2.107.0.html). (#4563)
- Frontend, druntime and Phobos are at version [2.107.0+](https://dlang.org/changelog/2.107.0.html). (#4563, #4577)

#### Platform support

Expand Down
2 changes: 1 addition & 1 deletion dmd/semantic2.d
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ private extern(C++) final class StaticAAVisitor : SemanticTimeTransitiveVisitor
hookFunc = new DotIdExp(aaExp.loc, hookFunc, Id.object);
hookFunc = new DotIdExp(aaExp.loc, hookFunc, Id._aaAsStruct);
auto arguments = new Expressions();
arguments.push(aaExp.syntaxCopy());
arguments.push(aaExp);
Expression loweredExp = new CallExp(aaExp.loc, hookFunc, arguments);

sc = sc.startCTFE();
Expand Down
17 changes: 17 additions & 0 deletions tests/dmd/runnable/staticaa.d
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@ void testEnumInit()

/////////////////////////////////////////////

// https://issues.dlang.org/show_bug.cgi?id=24370
immutable uint[3][string] test = [
"oneTwoThree": [1,2,3],
"fourFiveSix": [4,5,6],
"sevenEightNine": [7,8,9],
];

void testStaticArray()
{
assert(test["oneTwoThree"] == [1, 2, 3]);
assert(test["fourFiveSix"] == [4, 5, 6]);
assert(test["sevenEightNine"] == [7, 8, 9]);
}

/////////////////////////////////////////////

void main()
{
testSimple();
Expand All @@ -175,4 +191,5 @@ void main()
testImmutable();
testLocalStatic();
testEnumInit();
testStaticArray();
}

0 comments on commit 3c21924

Please sign in to comment.