This commit is contained in:
Konrad `ktoso` Malawski
2022-04-12 19:42:28 +09:00
committed by Pavel Yaskevich
parent a38fc3dc6c
commit 079bbcf517
17 changed files with 179 additions and 12 deletions

View File

@@ -42,6 +42,23 @@ distributed actor DistributedActor_1 {
distributed let letProperty: String = "" // expected-error{{property 'letProperty' cannot be 'distributed', only computed properties can}}
distributed var varProperty: String = "" // expected-error{{property 'varProperty' cannot be 'distributed', only computed properties can}}
distributed var computed: String {
"computed"
}
distributed var computedNotCodable: NotCodableValue { // expected-error{{result type 'NotCodableValue' of distributed property 'computedNotCodable' does not conform to serialization requirement 'Codable'}}
.init()
}
distributed var getSet: String { // expected-error{{'distributed' computed property 'getSet' cannot have setter}}
get {
"computed"
}
set {
_ = newValue
}
}
distributed static func distributedStatic() {} // expected-error{{'distributed' method cannot be 'static'}}
distributed class func distributedClass() {}
// expected-error@-1{{class methods are only allowed within classes; use 'static' to declare a static method}}