From 48a4f06b6154dcacccab89d8002c51442376d786 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Mon, 16 Jan 2017 23:18:25 -0800 Subject: SI-8685 Warn on deprecated case ctor The narrow use case in the ticket was just to warn on `C.apply` when the constructor has been deprecated. Someone added code to warn after the apply is rewritten, but it wasn't checking the constructor (and the tree was checked before but not after transform). --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/compiler/scala/tools/nsc/typechecker') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 296d9c6bca..45dfb427f0 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1158,6 +1158,7 @@ abstract class RefChecks extends Transform { } } checkUndesiredProperties(rtpe.typeSymbol, tree.pos) + checkUndesiredProperties(rtpe.typeSymbol.primaryConstructor, tree.pos) tree } -- cgit v1.2.3