diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-16 15:15:28 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:27 +0200 |
commit | c024a6037f3dd7e7458d936566cd4b653b8b7545 (patch) | |
tree | aae9b2e9b332fc166a04f1b29f1ff4e62fdd6216 /compiler/src/dotty/tools/dotc/core/tasty | |
parent | 549bd812684e6f269610234ddefe8054dfb42746 (diff) | |
download | dotty-c024a6037f3dd7e7458d936566cd4b653b8b7545.tar.gz dotty-c024a6037f3dd7e7458d936566cd4b653b8b7545.tar.bz2 dotty-c024a6037f3dd7e7458d936566cd4b653b8b7545.zip |
Break out functionality from MethodType
and generalize MethodParam to ParamRef, and
TypeParamInfo to ParamInfo
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/tasty')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala index 871f39838..d0d0e1863 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -266,7 +266,7 @@ class TreePickler(pickler: TastyPickler) { case TypeBounds(lo, hi) if lo eq hi => pickleNewType(lo, richTypes) case _ => assert(false, s"orphan poly parameter: $tpe") } - case tpe: MethodParam => + case tpe: ParamRef => assert(pickleParamType(tpe), s"orphan method parameter: $tpe") case tpe: LazyRef => pickleType(tpe.ref) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index 6c6ebc0a3..067fd6076 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -284,7 +284,7 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table, posUnpickle case PARAMtype => readTypeRef() match { case binder: PolyType => PolyParam(binder, readNat()) - case binder: MethodType => MethodParam(binder, readNat()) + case binder: MethodType => binder.newParamRef(readNat()) } case CLASSconst => ConstantType(Constant(readType())) |