aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorNicolas Stucki <nicolas.stucki@gmail.com>2016-12-18 16:13:53 +0100
committerGitHub <noreply@github.com>2016-12-18 16:13:53 +0100
commit3023cee4739fc974eebdc8b2f3134a85507864a6 (patch)
treeffa7ab290795b0f495190a6d334637ee2c7763f0 /compiler/src/dotty/tools/dotc/core/Types.scala
parent46bef7170fb48c0e48d0c5b38fcec29db64f7b13 (diff)
parent1846ad5850fa20a66ca0b627ef9d15be5f066e4e (diff)
downloaddotty-3023cee4739fc974eebdc8b2f3134a85507864a6.tar.gz
dotty-3023cee4739fc974eebdc8b2f3134a85507864a6.tar.bz2
dotty-3023cee4739fc974eebdc8b2f3134a85507864a6.zip
Merge pull request #1823 from dotty-staging/fix-#1789
Fix #1789: Fix signature of unit result type
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Types.scala6
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 93c381c4c..069b4f60d 100644
--- a/compiler/src/dotty/tools/dotc/core/Types.scala
+++ b/compiler/src/dotty/tools/dotc/core/Types.scala
@@ -2276,11 +2276,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
}