diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t2031.check | 6 | ||||
-rw-r--r-- | test/files/neg/t2031.scala | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/t2031.check b/test/files/neg/t2031.check new file mode 100644 index 0000000000..6fd70143eb --- /dev/null +++ b/test/files/neg/t2031.check @@ -0,0 +1,6 @@ +t2031.scala:8: error: polymorphic expression cannot be instantiated to expected type; + found : [A]scala.collection.generic.Builder[A,scala.collection.immutable.TreeSet[A]] + required: scala.collection.generic.BuilderFactory[Int,?,scala.collection.immutable.TreeSet[Int]] + res0.map(x => x)(TreeSet.newBuilder) + ^ +one error found diff --git a/test/files/neg/t2031.scala b/test/files/neg/t2031.scala new file mode 100644 index 0000000000..e4708c45ac --- /dev/null +++ b/test/files/neg/t2031.scala @@ -0,0 +1,9 @@ +import scala.collection.immutable._ + +object Test extends Application { + val res0 = TreeSet(1, 2, 3) + + //res0.map(x => x)(TreeSet.newBuilder[Int]) + + res0.map(x => x)(TreeSet.newBuilder) +} |