aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-04-21 18:10:25 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-05-08 21:51:46 +0200
commit782c24ff51865e43e34a2485dc585a757ada2c3b (patch)
treeb4aab29f24af18dd4ab428c2e8169cf8fc320be2 /src/dotty/tools/dotc/typer/Typer.scala
parent35366df3bed1e2a13aa41abfd0f75c7241f22197 (diff)
downloaddotty-782c24ff51865e43e34a2485dc585a757ada2c3b.tar.gz
dotty-782c24ff51865e43e34a2485dc585a757ada2c3b.tar.bz2
dotty-782c24ff51865e43e34a2485dc585a757ada2c3b.zip
Changed handling of repeated parameters.
Previously, repeated parameters were typed as `<repeated>[T]`. The method `underlyingWithRepeated` converts `<repeated>[T]` to `Seq[T]`. This method was called in typedIdent, but the call was ineffective because the type of a repeated parameter ident is a TermRef. This led to a retyping error in Decorators.scala under -Ycheck:front. We now distinguish between the type of the internal parameter ValDef and the type of the parameter in the MethodType. The former has the type `Seq[T] @dotty.annotation.internal.repeated`, the latter has the type `<repeated>[T]`. The translation with `underlyingWithRepeated` thus becomes unneccessary.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index d46b13818..c79ecdf85 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -260,7 +260,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
error(d"not found: $kind$name", tree.pos)
ErrorType
}
- checkValue(tree.withType(ownType.underlyingIfRepeated), pt)
+ checkValue(tree.withType(ownType), pt)
}
def typedSelect(tree: untpd.Select, pt: Type)(implicit ctx: Context): Tree = track("typedSelect") {