aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Definitions.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-02-21 17:08:43 +0100
committerGitHub <noreply@github.com>2017-02-21 17:08:43 +0100
commit6189ffe415c8905cc5802f0505d837b4142999db (patch)
tree40ba46ae1c6e1956939e7614a60bd72031291f63 /compiler/src/dotty/tools/dotc/core/Definitions.scala
parent61858c048bacb22aeab1893f8812896cb2b4d6a7 (diff)
parent779eaf6b9898e4ec8e2e3cdfbf0d36aeede3926e (diff)
downloaddotty-6189ffe415c8905cc5802f0505d837b4142999db.tar.gz
dotty-6189ffe415c8905cc5802f0505d837b4142999db.tar.bz2
dotty-6189ffe415c8905cc5802f0505d837b4142999db.zip
Merge pull request #1984 from dotty-staging/fix-#1747-v2
Fix #1747: Improve error message for Scala/Java type mismatch
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Definitions.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala
index 9e9e39a84..847177e2f 100644
--- a/compiler/src/dotty/tools/dotc/core/Definitions.scala
+++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala
@@ -9,6 +9,7 @@ import scala.annotation.{ switch, meta }
import scala.collection.{ mutable, immutable }
import PartialFunction._
import collection.mutable
+import util.common.alwaysZero
import scala.reflect.api.{ Universe => ApiUniverse }
object Definitions {
@@ -152,7 +153,7 @@ class Definitions {
resultTypeFn: PolyType => Type, flags: FlagSet = EmptyFlags) = {
val tparamNames = tpnme.syntheticTypeParamNames(typeParamCount)
val tparamBounds = tparamNames map (_ => TypeBounds.empty)
- val ptype = PolyType(tparamNames)(_ => tparamBounds, resultTypeFn)
+ val ptype = PolyType(tparamNames, tparamNames.map(alwaysZero))(_ => tparamBounds, resultTypeFn)
enterMethod(cls, name, ptype, flags)
}