diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-18 15:16:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-18 15:16:45 +0100 |
commit | 1846ad5850fa20a66ca0b627ef9d15be5f066e4e (patch) | |
tree | 0e60ed00554b17446159caac898bb0485b5f6722 /compiler/src/dotty | |
parent | 5df985cc599a0c69029773e3416bbb5fc883476a (diff) | |
download | dotty-1846ad5850fa20a66ca0b627ef9d15be5f066e4e.tar.gz dotty-1846ad5850fa20a66ca0b627ef9d15be5f066e4e.tar.bz2 dotty-1846ad5850fa20a66ca0b627ef9d15be5f066e4e.zip |
Fix #1789: Fix signature of unit result type
was scala.BoxedUnit, should be scala.Unit.
Diffstat (limited to 'compiler/src/dotty')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Types.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 4dffc4542..7a7a6ada8 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -2275,11 +2275,13 @@ object Types { protected def resultSignature(implicit ctx: Context) = try resultType match { case rtp: MethodicType => rtp.signature - case tp => Signature(tp, isJava = false) + case tp => + if (tp.isRef(defn.UnitClass)) Signature(Nil, defn.UnitClass.fullName.asTypeName) + else Signature(tp, isJava = false) } catch { case ex: AssertionError => - println(i"failure while taking result signture of $this: $resultType") + println(i"failure while taking result signature of $this: $resultType") throw ex } |