Skip to content

Files

Latest commit

 

History

History
33 lines (21 loc) · 563 Bytes

EqualsOnSignatureLine.md

File metadata and controls

33 lines (21 loc) · 563 Bytes

Pattern: Malformed = placement

Issue: -

Description

Requires that the equals sign, when used for an expression style function, is on the same line as the rest of the function signature.

Example of incorrect code:

fun stuff(): Int
		= 5

fun <V> foo(): Int where V : Int
		= 5

Example of correct code:

fun stuff() = 5

fun stuff() =
		foo.bar()

fun <V> foo(): Int where V : Int = 5

Further Reading