From 8464c16181474b625a3269e2c5b1f80a4a88482c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 10 Jan 2017 20:34:38 +0700 Subject: Address reviewer comments --- compiler/src/dotty/tools/dotc/typer/Dynamic.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/typer') diff --git a/compiler/src/dotty/tools/dotc/typer/Dynamic.scala b/compiler/src/dotty/tools/dotc/typer/Dynamic.scala index 49dd98523..000cfd026 100644 --- a/compiler/src/dotty/tools/dotc/typer/Dynamic.scala +++ b/compiler/src/dotty/tools/dotc/typer/Dynamic.scala @@ -120,7 +120,7 @@ trait Dynamic { self: Typer with Applications => * * If `U` is a method type (T1,...,Tn)R, map `x.a` to the equivalent of: * - * (x: Selectable).selectDynamicMethod(x, "a")(CT1, ..., CTn).asInstanceOf[(T1,...,Tn) => R] + * (x: Selectable).selectDynamicMethod("a", CT1, ..., CTn).asInstanceOf[(T1,...,Tn) => R] * * where CT1,...,CTn are the class tags representing the erasure of T1,...,Tn. * @@ -146,7 +146,8 @@ trait Dynamic { self: Typer with Applications => if (tpe.isDependent) fail(i"has a dependent method type") else if (tpe.paramNames.length > Definitions.MaxStructuralMethodArity) - fail(i"takes too many parameters") + fail(i"""takes too many parameters. + |Structural types only support methods taking up to ${Definitions.MaxStructuralMethodArity} arguments""") else { def issueError(msgFn: String => String): Unit = ctx.error(msgFn(""), tree.pos) val ctags = tpe.paramTypes.map(pt => -- cgit v1.2.3