diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-10-13 19:55:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 19:55:24 +0200 |
commit | 4f8a85c3f174a2fd04073475cef87691057af9bf (patch) | |
tree | c235207f5692063afd326680b9fc70fa4c1604cc /src | |
parent | dac5b931bcf8757070c8aa74571e52f3b4c6e5eb (diff) | |
parent | 6e78c7aff351de5e5c8ccddc319744a4f976d79c (diff) | |
download | dotty-4f8a85c3f174a2fd04073475cef87691057af9bf.tar.gz dotty-4f8a85c3f174a2fd04073475cef87691057af9bf.tar.bz2 dotty-4f8a85c3f174a2fd04073475cef87691057af9bf.zip |
Merge pull request #1586 from dotty-staging/fix/poly-unit
Fix erasure of "def foo[T]: Unit", do not box the return type
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeErasure.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeErasure.scala b/src/dotty/tools/dotc/core/TypeErasure.scala index fd5fcb921..254ea3277 100644 --- a/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/src/dotty/tools/dotc/core/TypeErasure.scala @@ -417,7 +417,7 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean // See doc comment for ElimByName for speculation how we could improve this. else MethodType(Nil, Nil, eraseResult(rt)) case tp: PolyType => - this(tp.resultType) match { + eraseResult(tp.resultType) match { case rt: MethodType => rt case rt => MethodType(Nil, Nil, rt) } |