aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-07 12:02:47 +1100
committerMartin Odersky <odersky@gmail.com>2017-02-07 12:02:47 +1100
commit8cf9d559eaec93577e16c053b5792f69bb66b06f (patch)
treef1d7b695e47ab32b6aae91a6c7e8d36971ceb971 /compiler/src/dotty/tools/dotc/typer/Namer.scala
parent64332a794c05cbf21491eaf0bfdf4482a80b1b10 (diff)
downloaddotty-8cf9d559eaec93577e16c053b5792f69bb66b06f.tar.gz
dotty-8cf9d559eaec93577e16c053b5792f69bb66b06f.tar.bz2
dotty-8cf9d559eaec93577e16c053b5792f69bb66b06f.zip
Fix wildApprox function
f-bounded-case-class.scala exhibited a StackOverflow in wildApprox before the fixes. The problem was due to F-bounds. Note: wildApprox is performance critical. I ran timed-bootstrap-repeated a couple of times to verify that the changes did not affect runtimes in significant ways. We should also watch out for a slowdown in the benchmark tests.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Namer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala
index 6bd8f6d06..ab8044c76 100644
--- a/compiler/src/dotty/tools/dotc/typer/Namer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -968,7 +968,7 @@ class Namer { typer: Typer =>
ctx.defContext(sym).denotNamed(original)
def paramProto(paramss: List[List[Type]], idx: Int): Type = paramss match {
case params :: paramss1 =>
- if (idx < params.length) wildApprox(params(idx))
+ if (idx < params.length) wildApprox(params(idx), null, Set.empty)
else paramProto(paramss1, idx - params.length)
case nil =>
WildcardType