mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
21 lines
388 B
Swift
21 lines
388 B
Swift
// RUN: %target-swift-emit-silgen -verify %s
|
|
|
|
// https://github.com/apple/swift/issues/51493
|
|
|
|
protocol SomeProtocol { }
|
|
class SomeClass: SomeProtocol { }
|
|
struct SomeStruct { var x, y: Int }
|
|
|
|
extension SomeProtocol {
|
|
var someProperty: SomeStruct {
|
|
nonmutating set { }
|
|
get { return SomeStruct(x: 1, y: 2) }
|
|
}
|
|
}
|
|
|
|
func f(i: Int) {
|
|
SomeClass().someProperty.x = i
|
|
}
|
|
|
|
|