Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Serialization/Serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6319,6 +6319,7 @@ void Serializer::writeAllDeclsAndTypes() {
registerDeclTypeAbbr<PackTypeLayout>();
registerDeclTypeAbbr<SILPackTypeLayout>();
registerDeclTypeAbbr<IntegerTypeLayout>();
registerDeclTypeAbbr<InlineArrayTypeLayout>();

registerDeclTypeAbbr<ErrorFlagLayout>();
registerDeclTypeAbbr<ErrorTypeLayout>();
Expand Down
6 changes: 5 additions & 1 deletion test/Serialization/value_generics.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %s -emit-module -enable-experimental-feature RawLayout -disable-availability-checking -parse-as-library -o %t
// RUN: %target-swift-frontend %s -emit-module -enable-experimental-feature RawLayout -enable-experimental-feature InlineArrayTypeSugar -disable-availability-checking -parse-as-library -o %t
// RUN: %target-sil-opt -enable-sil-verify-all %t/value_generics.swiftmodule -o - | %FileCheck %s

// REQUIRES: swift_feature_RawLayout
// REQUIRES: swift_feature_InlineArrayTypeSugar

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

// CHECK: func something<let N : Int>(_: borrowing Vector<Int, N>)
func something<let N: Int>(_: borrowing Vector<Int, N>) {}

// CHECK: func hello(_: [4 x Int])
func hello(_: [4 x Int]) {}