Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Commit 6370a4a

Browse files
committed
Add override keywords to ReusingPrinter where necessary
1 parent 539abd5 commit 6370a4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

org.scala-refactoring.library/src/main/scala/scala/tools/refactoring/sourcegen/ReusingPrinter.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,22 @@ trait ReusingPrinter extends TreePrintingTraversals with AbstractPrinter {
202202

203203
override def CaseDef(tree: CaseDef, pat: Tree, guard: Tree, body: Tree)(implicit ctx: PrintingContext) = {
204204
val arrowReq = new Requisite {
205-
def isRequired(l: Layout, r: Layout) = {
205+
override def isRequired(l: Layout, r: Layout) = {
206206
!(l.contains("=>") || r.contains("=>") || p(body).asText.startsWith("=>"))
207207
}
208208

209209
// It's just nice to have a whitespace before and after the arrow
210-
def getLayout = Layout(" => ")
210+
override def getLayout = Layout(" => ")
211211
}
212212

213213
val ifReq = new Requisite {
214-
def isRequired(l: Layout, r: Layout) = {
214+
override def isRequired(l: Layout, r: Layout) = {
215215
!(l.contains("if") || r.contains("if"))
216216
}
217217

218218
// Leading and trailing whitespace is required in some cases!
219219
// e.g. `case i if i > 0 => ???` becomes `case iifi > 0 => ???` otherwise
220-
def getLayout = Layout(" if ")
220+
override def getLayout = Layout(" if ")
221221
}
222222

223223
body match {

0 commit comments

Comments
 (0)