From 6e78c7aff351de5e5c8ccddc319744a4f976d79c Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 13 Oct 2016 02:05:30 +0200 Subject: Fix erasure of "def foo[T]: Unit", do not box the return type --- src/dotty/tools/dotc/core/TypeErasure.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/TypeErasure.scala') 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) } -- cgit v1.2.3