Skip to content

Commit 84a7494

Browse files
Fix: add documentation
1 parent 28e6ff5 commit 84a7494

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/dotty/tools/dotc/transform/ClassOf.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import core.Symbols.TermSymbol
99
import core.TypeErasure
1010
import TreeTransforms.{MiniPhaseTransform, TransformerInfo, TreeTransform}
1111

12+
/** Performs rewritings as follows for `classOf` calls:
13+
* classOf[CustomValueClass] ~> CustomValueClass type
14+
* classOf[ValueClass] ~> ValueClass type, where ValueClass is Boolean, Byte, Short, etc.
15+
* classOf[AnyOtherType] ~> erasure(AnyOtherType)
16+
*/
1217
class ClassOf extends MiniPhaseTransform {
1318
import tpd._
1419

0 commit comments

Comments
 (0)