This is what I found: https://github.com/odersky/dotty/blob/topic/info-transforms/src/dotty/tools/dotc/ast/tpd.scala#L350