summaryrefslogtreecommitdiff
path: root/test/files/pos/t6355pos.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-6355, weakend implementation restriction on applyDynamic.Paul Phillips2013-02-121-0/+16
I realized one can successfully call an overloaded applyDynamic, under conditions such as these: def applyDynamic[T1](m: String)(x1: T1): Any = 1 def applyDynamic[T1, T2](m: String)(x: T1, y: T2): Any = 2 def applyDynamic[T1, T2, T3](m: String)(x: T1, y: T2, z: T3): Any = 3 So I weakened the overloading restriction to allow overloading if each method has a distinct number of type parameters. This very likely still allows the creation of uncallable overloads, but an overly restrictive rule is worse. If the overload cannot be called, it will still be discovered at the call site.