feat(swift): add will/didSet indent

Fixes CI error in PR.6237
This commit is contained in:
Phạm Huy Hoàng 2024-03-03 23:56:32 +09:00 committed by 再生花
parent 3d08cdd741
commit 63ca90eaa3
4 changed files with 10 additions and 3 deletions

View file

@ -16,6 +16,9 @@ class EquilateralTriangle: NamedShape {
var perimeter: Double {
willSet {
}
didSet {
}
}
@funcattr

View file

@ -15,7 +15,8 @@ describe("indent Swift:", function()
run:new_line("declarations.swift", { on_line = 6, text = "var x = 1", indent = 2 })
run:new_line("declarations.swift", { on_line = 12, text = "var textInsideInit = true", indent = 4 })
run:new_line("declarations.swift", { on_line = 17, text = "var textInsideWillSet = 1", indent = 6 })
run:new_line("declarations.swift", { on_line = 22, text = "var textInsideOverrideFunc", indent = 4 })
run:new_line("declarations.swift", { on_line = 28, text = "var InsideProtocol: String { get }", indent = 2 })
run:new_line("declarations.swift", { on_line = 20, text = "var textInsideDidSet = 1", indent = 6 })
run:new_line("declarations.swift", { on_line = 25, text = "var textInsideOverrideFunc", indent = 4 })
run:new_line("declarations.swift", { on_line = 31, text = "var InsideProtocol: String { get }", indent = 2 })
end)
end)