From bad61ce0ff9f460c2f8873c134a7f6bee0a53824 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 6 Apr 2017 18:13:22 -0700 Subject: SD-363 Xlint no warn deprecated params, defaults Deprecation is an escape hatch for unused params. Since default arg getters receive values of previous args, don't warn when they are unused. --- test/files/pos/t8040.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/files/pos/t8040.scala b/test/files/pos/t8040.scala index 1d1a770060..3e01014ab4 100644 --- a/test/files/pos/t8040.scala +++ b/test/files/pos/t8040.scala @@ -5,4 +5,9 @@ object Test { } def f(implicit x: DummyImplicit) = 42 // no warn DummyImplicit + + + def f(x: Int)(y: Int = 1) = x + y // no warn default getter + + def g(@deprecated("","") x: Int) = 42 // no warn deprecated } -- cgit v1.2.3