From aa122ae00018a2240b39efe53221b731a6db6634 Mon Sep 17 00:00:00 2001 From: Dennis Korpel Date: Tue, 6 Feb 2024 22:31:28 +0100 Subject: [PATCH 1/3] Fix Bugzilla Issue 24370 - static array values in static AA initialise to dynamic arrays --- compiler/src/dmd/semantic2.d | 2 +- compiler/test/runnable/staticaa.d | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/compiler/src/dmd/semantic2.d b/compiler/src/dmd/semantic2.d index b4f91ac7cf..e706e20b85 100644 --- a/compiler/src/dmd/semantic2.d +++ b/compiler/src/dmd/semantic2.d @@ -876,7 +876,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(); diff --git a/compiler/test/runnable/staticaa.d b/compiler/test/runnable/staticaa.d index e5b25d1f66..089144c4fb 100644 --- a/compiler/test/runnable/staticaa.d +++ b/compiler/test/runnable/staticaa.d @@ -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(); @@ -175,4 +191,5 @@ void main() testImmutable(); testLocalStatic(); testEnumInit(); + testStaticArray(); } From f2c4b44248abbb47ceac0a6bad5205ce3d9692a6 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Thu, 15 Feb 2024 22:27:40 +0000 Subject: [PATCH 2/3] bump VERSION to v2.107.1-rc.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8463aee451..1880c9808c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.107.0 +v2.107.1-rc.1 From 3d2892be7cef0cf9b563c501cf11c7b30ea27f0c Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Thu, 15 Feb 2024 10:52:44 +0100 Subject: [PATCH 3/3] gha: Ignore macOS 13 if linker is broken on the runner --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd9eb2f67c..3ebef1dab1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,6 +71,7 @@ jobs: model: 32 name: ${{ matrix.job_name }} runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.os == 'macos-13' }} timeout-minutes: 40 env: # for ci/run.sh: