diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-04 10:33:29 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-04 10:33:29 +0100 |
commit | eeab526ef293abdb15d1776e470aca59c4697cfd (patch) | |
tree | a14677567bd9d87b37cc4e3f7dd1a4d91bab5707 /tests/pos/typers.scala | |
parent | 5cff81ca46d771033b9877f510080871cbaebbfc (diff) | |
download | dotty-eeab526ef293abdb15d1776e470aca59c4697cfd.tar.gz dotty-eeab526ef293abdb15d1776e470aca59c4697cfd.tar.bz2 dotty-eeab526ef293abdb15d1776e470aca59c4697cfd.zip |
Generalize overloading resolution to type arguments.
We need to take type arguments + value arguments into account when there are several overloaded
alternatives that are all polymorphic and can be instantiated with the type arguments.
Diffstat (limited to 'tests/pos/typers.scala')
-rw-r--r-- | tests/pos/typers.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala index 2e0a7c0fd..c02bcda22 100644 --- a/tests/pos/typers.scala +++ b/tests/pos/typers.scala @@ -1,9 +1,10 @@ package test import annotation.{tailrec, switch} +import collection.mutable._ object typers { - + object Eta { def fun(x: Int): Int = x + 1 @@ -114,5 +115,7 @@ object typers { val arr = List("a", "b", "c").toArray val i = 2 arr(i).charAt(0) + + val x = new ArrayBuffer[String] // testing overloaded polymorphic constructors } }
\ No newline at end of file |