Skip to content

Commit dccbcf3

Browse files
authored
Merge pull request swiftlang#80318 from Azoy/fix-inline-array-sugar-serialization
[Serialization] Fix serialization for InlineArray sugar
2 parents 6082173 + b5e8f49 commit dccbcf3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/Serialization/Serialization.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -6322,6 +6322,7 @@ void Serializer::writeAllDeclsAndTypes() {
63226322
registerDeclTypeAbbr<PackTypeLayout>();
63236323
registerDeclTypeAbbr<SILPackTypeLayout>();
63246324
registerDeclTypeAbbr<IntegerTypeLayout>();
6325+
registerDeclTypeAbbr<InlineArrayTypeLayout>();
63256326

63266327
registerDeclTypeAbbr<ErrorFlagLayout>();
63276328
registerDeclTypeAbbr<ErrorTypeLayout>();

test/Serialization/value_generics.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend %s -emit-module -enable-experimental-feature RawLayout -disable-availability-checking -parse-as-library -o %t
2+
// RUN: %target-swift-frontend %s -emit-module -enable-experimental-feature RawLayout -enable-experimental-feature InlineArrayTypeSugar -disable-availability-checking -parse-as-library -o %t
33
// RUN: %target-sil-opt -enable-sil-verify-all %t/value_generics.swiftmodule -o - | %FileCheck %s
44

55
// REQUIRES: swift_feature_RawLayout
6+
// REQUIRES: swift_feature_InlineArrayTypeSugar
67

78
// CHECK: @_rawLayout(likeArrayOf: Element, count: Count) struct Vector<Element, let Count : Int> : ~Copyable where Element : ~Copyable {
89
@_rawLayout(likeArrayOf: Element, count: Count)
@@ -20,3 +21,6 @@ extension Vector where Count == 2 {
2021

2122
// CHECK: func something<let N : Int>(_: borrowing Vector<Int, N>)
2223
func something<let N: Int>(_: borrowing Vector<Int, N>) {}
24+
25+
// CHECK: func hello(_: [4 x Int])
26+
func hello(_: [4 x Int]) {}

0 commit comments

Comments
 (0)