Files
swift-mirror/validation-test/compiler_crashers_2/sr11637.swift
2019-10-19 03:34:09 +01:00

22 lines
405 B
Swift

// RUN: not --crash %target-swift-frontend -primary-file %s -emit-silgen
// REQUIRES: asserts
@propertyWrapper
struct MutatingGetNonMutatingSetWrapper<T> {
private var fixed: T
var wrappedValue: T {
mutating get { fixed }
nonmutating set { }
}
init(wrappedValue initialValue: T) {
fixed = initialValue
}
}
struct Foo {
@MutatingGetNonMutatingSetWrapper var text: String
}