diff options
author | Martin Odersky <odersky@gmail.com> | 2014-09-21 14:40:41 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-11 08:24:36 +0200 |
commit | ce81244e6c4fc7b5b8ccc70ad32290045a591739 (patch) | |
tree | 8f62951a0e1e07963a33d1a199e74e2de3f1a83f /tests/pos | |
parent | d9a911c43bbedcae8a787eafb91bb6889a8ff461 (diff) | |
download | dotty-ce81244e6c4fc7b5b8ccc70ad32290045a591739.tar.gz dotty-ce81244e6c4fc7b5b8ccc70ad32290045a591739.tar.bz2 dotty-ce81244e6c4fc7b5b8ccc70ad32290045a591739.zip |
Fix handling of type params in secondary constructors
Params are already added by Desugar. No special treatment needed here.
Besides primaryConstructor.typeParams is always empty, because term symbols
do not have type parameters.
The fix turns t2660.scala into an error. I believe the error is correct, hence
the test was moved with a comment to neg.
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/t2660.scala | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/pos/t2660.scala b/tests/pos/t2660.scala deleted file mode 100644 index 94a40f740..000000000 --- a/tests/pos/t2660.scala +++ /dev/null @@ -1,25 +0,0 @@ -package hoho - -class G - -class H extends G - -class A[T](x: T) { - - def this(y: G, z: T) = { - this(z) - print(1) - } - - def this(z: H, h: T) = { - this(h) - print(2) - } -} - -object T { - def main(args: Array[String]): Unit = { - implicit def g2h(g: G): H = new H - new A[Int](new H, 23) - } -} |