branch: elpa/swift-mode commit f614620ad63adcb617df7964923766194810ec73 Author: taku0 <mxxouy6x3m_git...@tatapa.org> Commit: taku0 <mxxouy6x3m_git...@tatapa.org>
Add tests for effectful read-only properties https://github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md --- test/swift-files/indent/declarations.swift | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/swift-files/indent/declarations.swift b/test/swift-files/indent/declarations.swift index f00c54c..598724a 100644 --- a/test/swift-files/indent/declarations.swift +++ b/test/swift-files/indent/declarations.swift @@ -236,6 +236,35 @@ class Foo { foo() } } + + var x { + get + async + throws { + 1 + } + } + + var x { + get + async + throws + { + 1 + } + } + + internal var x: Int { + @A + mutating + get + async + throws + + @A + mutating + set + } } // Type alias declaration @@ -602,11 +631,19 @@ protocol Foo { A: C subscript(x: Int) -> Int { get + async + throws set } associatedtype AAA = BBB convenience init(x: Int, y, Int) + var foo: Int { + get + async + throws + set + } } // Operator declarations