summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2017-01-16 23:18:25 -0800
committerSom Snytt <som.snytt@gmail.com>2017-01-16 23:18:25 -0800
commit48a4f06b6154dcacccab89d8002c51442376d786 (patch)
treedcb2ee4cc4d3c51612e802355c77d14a239ac0ca /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent827d69d48e96d9add75ce19e06b374610784c936 (diff)
downloadscala-48a4f06b6154dcacccab89d8002c51442376d786.tar.gz
scala-48a4f06b6154dcacccab89d8002c51442376d786.tar.bz2
scala-48a4f06b6154dcacccab89d8002c51442376d786.zip
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).
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala1
1 files changed, 1 insertions, 0 deletions
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
}