File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -4491,7 +4491,7 @@ class DeclDeserializer {
4491
4491
4492
4492
dtor->setGenericSignature (MF.getGenericSignature (genericSigID));
4493
4493
4494
- dtor->setAccess (std::max (cast<ClassDecl >(DC)->getFormalAccess (),
4494
+ dtor->setAccess (std::max (cast<NominalTypeDecl >(DC)->getFormalAccess (),
4495
4495
AccessLevel::Internal));
4496
4496
4497
4497
if (isImplicit)
Original file line number Diff line number Diff line change
1
+
2
+ @_moveOnly
3
+ public struct MoveOnlyStruct {
4
+ private let desc : Int
5
+
6
+ public init ( desc: Int ) {
7
+ self . desc = desc
8
+ }
9
+
10
+ deinit { }
11
+ }
12
+
13
+ @_moveOnly
14
+ public enum MoveOnlyEnum {
15
+ case lhs( Int )
16
+ case rhs( Int )
17
+
18
+ deinit { }
19
+ }
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend -enable-experimental-move-only -g -emit-module -module-name OtherModule %S/Inputs/moveonly_deinit.swift -emit-module-path %t/OtherModule.swiftmodule
3
+ // RUN: %target-swift-frontend -enable-experimental-move-only -g -I %t %s -emit-silgen
4
+
5
+ // Make sure we can deserialize deinits of both enums and structs.
6
+
7
+ import OtherModule
8
+
9
+ let s = MoveOnlyStruct ( desc: 5 )
10
+ let e = MoveOnlyEnum . lhs ( 5 )
You can’t perform that action at this time.
0 commit comments