aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/UnPickler.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/UnPickler.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/UnPickler.scala17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
index f35c24fd7..ea42b40a4 100644
--- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
@@ -44,8 +44,21 @@ object UnPickler {
*/
def depoly(tp: Type, denot: SymDenotation)(implicit ctx: Context): Type = tp match {
case TempPolyType(tparams, restpe) =>
- if (denot.isAbstractType) restpe.bounds.higherKinded(tparams)
- else PolyType.fromSymbols(tparams, restpe)
+ if (denot.isAbstractType)
+ restpe.bounds.higherKinded(tparams)
+ else if (denot.isAliasType) {
+ var err: Option[(String, Position)] = None
+ val result = restpe.LambdaAbstract(tparams) { (msg, pos) => err = Some((msg, pos)) }
+ for ((msg, pos) <- err)
+ ctx.warning(
+ s"""$msg
+ |originally parsed type : ${tp.show}
+ |will be approximated by: ${result.show}.
+ |Proceed at own risk.""".stripMargin)
+ result
+ }
+ else
+ PolyType.fromSymbols(tparams, restpe)
case tp => tp
}