diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-12 17:12:44 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-11-12 17:12:44 +0100 |
commit | c4aa3c058904912ba1b5696b2aaa4d9234dc5c79 (patch) | |
tree | 88202fd564fabaa60bc135ded32d9216e83029a7 /src/dotty/tools/dotc/transform/ElimRepeated.scala | |
parent | 7978a5f6a1be13ca9c482c3f2e9c2102018cfcf0 (diff) | |
download | dotty-c4aa3c058904912ba1b5696b2aaa4d9234dc5c79.tar.gz dotty-c4aa3c058904912ba1b5696b2aaa4d9234dc5c79.tar.bz2 dotty-c4aa3c058904912ba1b5696b2aaa4d9234dc5c79.zip |
Avoid forcing infos of some symbols in InfoTransforms
Provides the "mayChange" hook to exclude symbols from being completed
prior to a transformInfo.
Diffstat (limited to 'src/dotty/tools/dotc/transform/ElimRepeated.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/ElimRepeated.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/ElimRepeated.scala b/src/dotty/tools/dotc/transform/ElimRepeated.scala index eb44c3e2c..03fd28a26 100644 --- a/src/dotty/tools/dotc/transform/ElimRepeated.scala +++ b/src/dotty/tools/dotc/transform/ElimRepeated.scala @@ -28,6 +28,8 @@ class ElimRepeated extends MiniPhaseTransform with InfoTransformer { thisTransfo def transformInfo(tp: Type, sym: Symbol)(implicit ctx: Context): Type = elimRepeated(tp) + override def mayChange(sym: Symbol)(implicit ctx: Context): Boolean = sym is Method + private def elimRepeated(tp: Type)(implicit ctx: Context): Type = tp.stripTypeVar match { case tp @ MethodType(paramNames, paramTypes) => val resultType1 = elimRepeated(tp.resultType) |