Skip to content

Files

Latest commit

 

History

History
55 lines (30 loc) · 590 Bytes

statement_position.md

File metadata and controls

55 lines (30 loc) · 590 Bytes

Pattern: Malformed statement position

Issue: -

Description

else and catch should be on the same line, one space after the previous declaration.

Examples of correct code:

} else if {


} else {


} catch {


"}else{"


struct A { let catchphrase: Int }
let a = A(
 catchphrase: 0
)


struct A { let `catch`: Int }
let a = A(
 `catch`: 0
)

Examples of incorrect code:

}else if {


}  else {


}
catch {


}
	  catch {

Further Reading