Open
Description
With this code:
package com.example
import shapeless.record._
object Foo {
private type X = Record.`'a -> Int`.T
private type Y = Record.`'b -> X`.T
val foo: Y = Record(b = Record(a = 0))
}
I get the following warning with -Xlint:unused
:
[warn] .../Foo.scala:7: private type X in object Foo is never used
[warn] private type X = Record.`'a -> Int`.T
[warn] ^
However, type X
is clearly used (if I remove it, I get a compile error).
Build options:
scalaVersion := "2.12.2"
scalacOptions += "-Xlint:unused"
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.2"
See also #10296 and scala/scala#5876.