Files
swift-mirror/test/Concurrency/async_computed_property.swift

16 lines
625 B
Swift

// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
// REQUIRES: concurrency
func asyncFunc(_ value: String) async {}
class ComputedPropertyClass {
var meep: String {
//expected-error@+1:11{{'async' call in a function that does not support concurrency}}
await asyncFunc("Meep")
return "15"
}
}