File tree Expand file tree Collapse file tree 2 files changed +22
-20
lines changed
validation-test/compiler_crashers_2 Expand file tree Collapse file tree 2 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -533,33 +533,14 @@ class ClassWrapper<T> {
533
533
}
534
534
}
535
535
536
-
537
- struct SR_11603_1 {
536
+ struct SR_11603 {
538
537
@StructWrapper @ClassWrapper var prop : Int
539
538
540
539
func foo( ) {
541
540
prop = 1234
542
541
}
543
542
}
544
543
545
- @propertyWrapper
546
- struct MutatingGetNonMutatingSetWrapper < T> {
547
- private var fixed : T
548
-
549
- var wrappedValue : T {
550
- mutating get { fixed }
551
- nonmutating set { }
552
- }
553
-
554
- init ( wrappedValue initialValue: T ) {
555
- fixed = initialValue
556
- }
557
- }
558
-
559
- struct SR_11603_2 {
560
- @MutatingGetNonMutatingSetWrapper var text : String = " "
561
- }
562
-
563
544
// CHECK-LABEL: sil_vtable ClassUsingWrapper {
564
545
// CHECK-NEXT: #ClassUsingWrapper.x!getter.1: (ClassUsingWrapper) -> () -> Int : @$s17property_wrappers17ClassUsingWrapperC1xSivg // ClassUsingWrapper.x.getter
565
546
// CHECK-NEXT: #ClassUsingWrapper.x!setter.1: (ClassUsingWrapper) -> (Int) -> () : @$s17property_wrappers17ClassUsingWrapperC1xSivs // ClassUsingWrapper.x.setter
Original file line number Diff line number Diff line change
1
+ // RUN: not --crash %target-swift-frontend -primary-file %s -emit-silgen
2
+
3
+ // REQUIRES: asserts
4
+
5
+ @propertyWrapper
6
+ struct MutatingGetNonMutatingSetWrapper < T> {
7
+ private var fixed : T
8
+
9
+ var wrappedValue : T {
10
+ mutating get { fixed }
11
+ nonmutating set { }
12
+ }
13
+
14
+ init ( wrappedValue initialValue: T ) {
15
+ fixed = initialValue
16
+ }
17
+ }
18
+
19
+ struct Foo {
20
+ @MutatingGetNonMutatingSetWrapper var text : String
21
+ }
You can’t perform that action at this time.
0 commit comments