summaryrefslogtreecommitdiff
path: root/test/files/neg/t6355.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-6355, weakend implementation restriction on applyDynamic.Paul Phillips2013-02-121-0/+6
| | | | | | | | | | | | | | | 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.
* Error for SI-6355, overloading of applyDynamic.Paul Phillips2012-11-141-0/+13
As long as it can never be called anyway, seems like we'd be doing people a kindness to fail the compile rather than letting it be ambiguous at every use site.