summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorAntonio Cunei <antonio.cunei@epfl.ch>2009-11-24 17:30:44 +0000
committerAntonio Cunei <antonio.cunei@epfl.ch>2009-11-24 17:30:44 +0000
commit839d0ee5ec9c27e2e5da6bab6f03c8a95e90a109 (patch)
tree613ed692570fb5891f57e76854d9ff4af8ed13d1 /test/files/neg
parent5f71b9208404015f425f30a0b4b3f4b3df4ec83f (diff)
downloadscala-839d0ee5ec9c27e2e5da6bab6f03c8a95e90a109.tar.gz
scala-839d0ee5ec9c27e2e5da6bab6f03c8a95e90a109.tar.bz2
scala-839d0ee5ec9c27e2e5da6bab6f03c8a95e90a109.zip
Merged revisions 19624,19629-19630,19645,19651,...
Merged revisions 19624,19629-19630,19645,19651,19655-19660,19666-19668,19670,19673-19679, 19683-19685,19688,19692,19695-19700,19706-19707,19717-19719,19723-19724, 19726,19730,19735-19740,19742-19744,19746-19759,19762-19764,19767-19769, 19773,19776,19781,19787,19789,19792-19793,19798-19800,19803-19804,19806- 19808,19813-19815,19818-19820,19824 via svnmerge from https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk ........ r19624 | moors | 2009-11-13 13:17:50 +0100 (Fri, 13 Nov 2009) | 2 lines fixed #1236 another Symbol::tpe bites the dust (should'be been tpeHK) ........ r19629 | rytz | 2009-11-13 16:53:11 +0100 (Fri, 13 Nov 2009) | 1 line review board scipt ........ r19630 | rytz | 2009-11-13 17:10:35 +0100 (Fri, 13 Nov 2009) | 1 line updates to review script ........ r19645 | odersky | 2009-11-13 18:31:12 +0100 (Fri, 13 Nov 2009) | 1 line Fixes #1477 by requiring that abstract types with non-volatile upper bounds cannot be overridden by volatile types. ........ r19651 | extempore | 2009-11-14 19:02:10 +0100 (Sat, 14 Nov 2009) | 5 lines Fixes and test cases for #2087 and #2400. This required fixing a long-standing bug in fjbg and recompiling fjbg.jar, which had the side effect of revealing that the current fjbg jar had never been recompiled with target 1.5, so now it's smaller and (I imagine) faster. ........ r19655 | odersky | 2009-11-15 12:14:57 +0100 (Sun, 15 Nov 2009) | 2 lines Fixed #2848 and #2630; Improvements in equality speed ........ r19656 | odersky | 2009-11-15 14:56:21 +0100 (Sun, 15 Nov 2009) | 2 lines Fixed #1459 ........ r19657 | odersky | 2009-11-15 15:17:48 +0100 (Sun, 15 Nov 2009) | 2 lines Added benchmarks with results for equality. ........ r19658 | milessabin | 2009-11-15 16:46:52 +0100 (Sun, 15 Nov 2009) | 1 line Fixed #2627. Also ensure that a non-empty dependencies file is created on the first build. ........ r19659 | extempore | 2009-11-15 19:08:45 +0100 (Sun, 15 Nov 2009) | 3 lines Tweaked a test which has been regularly failing due to heap exhaustion, although what it's supposed to be testing is stack utilization. ........ r19660 | milessabin | 2009-11-15 21:57:46 +0100 (Sun, 15 Nov 2009) | 1 line Corrected help syntax for -Ybuilder-debug. ........ r19666 | milessabin | 2009-11-16 11:17:01 +0100 (Mon, 16 Nov 2009) | 1 line Fixed #2627. ........ r19667 | rytz | 2009-11-16 11:45:54 +0100 (Mon, 16 Nov 2009) | 1 line review requests can now be created outside a checkout ........ r19668 | rytz | 2009-11-16 11:55:59 +0100 (Mon, 16 Nov 2009) | 1 line another minor change to teh review script ........ r19670 | odersky | 2009-11-16 13:31:40 +0100 (Mon, 16 Nov 2009) | 2 lines Fixed #2323; made Pickler do the right thing. ........ r19673 | moors | 2009-11-16 18:44:25 +0100 (Mon, 16 Nov 2009) | 1 line test cases in pending ........ r19674 | dragos | 2009-11-16 19:24:40 +0100 (Mon, 16 Nov 2009) | 2 lines Faster optimizer by caching successors/predecessors in basic blocks, and better lub for icode ........ r19675 | extempore | 2009-11-16 22:30:22 +0100 (Mon, 16 Nov 2009) | 1 line Minor pickler organization stemming from optimizer appeasement. ........ r19676 | extempore | 2009-11-16 22:30:36 +0100 (Mon, 16 Nov 2009) | 2 lines Some organization & duplication removal in GenICode stemming from optimizer appeasement. ........ r19677 | extempore | 2009-11-16 22:30:54 +0100 (Mon, 16 Nov 2009) | 2 lines A lot of minor code adjustments to ease the burden on the optimizer, and various cleanups encountered along the way. ........ r19678 | extempore | 2009-11-16 22:31:07 +0100 (Mon, 16 Nov 2009) | 2 lines Some organization & duplication removal in RefChecks stemming from optimizer appeasement. ........ r19679 | extempore | 2009-11-16 22:56:00 +0100 (Mon, 16 Nov 2009) | 1 line Fix for #2647. ........ r19683 | extempore | 2009-11-17 05:51:43 +0100 (Tue, 17 Nov 2009) | 1 line Fix and test case for #2636. ........ r19684 | extempore | 2009-11-17 06:25:48 +0100 (Tue, 17 Nov 2009) | 2 lines Contents of scala.Math moved into scala.math package object, and scala.Math deprecated. Also a couple janitorial cleanups. ........ r19685 | milessabin | 2009-11-17 10:04:00 +0100 (Tue, 17 Nov 2009) | 1 line More String.isEmpty breakage. ........ r19688 | odersky | 2009-11-17 14:12:31 +0100 (Tue, 17 Nov 2009) | 1 line Allow implicit modifier on single-parameter function literals. Fixes and closes #1492. ........ r19692 | extempore | 2009-11-17 21:51:23 +0100 (Tue, 17 Nov 2009) | 1 line Partial fix for #2625. ........ r19695 | extempore | 2009-11-18 01:18:58 +0100 (Wed, 18 Nov 2009) | 11 lines Removing bits from the library which shouldn't make the 2.8 cut. Removed outright: util.Hashable: unused and I have a better plan for this net.Utility: class created to accomodate expansion which never materialized reflect.Invocation: doesn't go far enough, needs love it won't find right now reflect.RichClass: same as Invocation Moved into compiler: util.ScalaClassLoader: too useful to lose, not done enough to ship ........ r19696 | extempore | 2009-11-18 01:36:26 +0100 (Wed, 18 Nov 2009) | 1 line More minor removals and some cleanups of !!!s and XXXs. ........ r19697 | dcaoyuan | 2009-11-18 05:35:07 +0100 (Wed, 18 Nov 2009) | 1 line Fixed #2631 ........ r19698 | dcaoyuan | 2009-11-18 05:36:59 +0100 (Wed, 18 Nov 2009) | 1 line to fix varies conditions of removed source/class files that were previously recorded in .scala_dependencies. ........ r19699 | extempore | 2009-11-18 06:41:16 +0100 (Wed, 18 Nov 2009) | 3 lines More deprecation work. Removes most elements which have been deprecated since 2.7.2 (still except for lower case primitive type aliases) and removes every deprecated method which has never shipped in a release. ........ r19700 | rytz | 2009-11-18 11:19:30 +0100 (Wed, 18 Nov 2009) | 1 line recompiled msil.jar, it refered to scala.Math$ ........ r19706 | extempore | 2009-11-18 15:45:11 +0100 (Wed, 18 Nov 2009) | 3 lines Fixed a bug in Range which was causing take and drop to overflow and return empty if the argument was larger than the actual length of the Range and arg * step > MaxInt. ........ r19707 | dcaoyuan | 2009-11-18 15:46:01 +0100 (Wed, 18 Nov 2009) | 1 line Fixed #2645 ........ r19717 | extempore | 2009-11-18 23:06:03 +0100 (Wed, 18 Nov 2009) | 3 lines Finally completed the incredibly tedious task of removing the lower case primitive aliases from Predef. Had to rebuild msil.jar along the way. ........ r19718 | extempore | 2009-11-18 23:43:54 +0100 (Wed, 18 Nov 2009) | 2 lines New starr based on r19717 since I'm finding the current starr doesn't have TupleN.zipped fully working. ........ r19719 | extempore | 2009-11-19 00:24:23 +0100 (Thu, 19 Nov 2009) | 2 lines More deprecation soothing. Soon we'll be down to a double-digit warning count. ........ r19723 | extempore | 2009-11-19 05:59:46 +0100 (Thu, 19 Nov 2009) | 2 lines Restoring an embarassingly large quantity of deprecated methods whose time had not yet come. ........ r19724 | dcaoyuan | 2009-11-19 09:24:37 +0100 (Thu, 19 Nov 2009) | 1 line Path.parent now returns Path instead of Option[Path], and it prefers relative path. ........ r19726 | rytz | 2009-11-19 14:44:15 +0100 (Thu, 19 Nov 2009) | 1 line closes #2670. the target-annotations can now be placed on annotation classes as well ........ r19730 | extempore | 2009-11-19 21:31:46 +0100 (Thu, 19 Nov 2009) | 2 lines Deprecation patrol exercises the new capabilities in Tuple2.zipped among other exciting no-ops. ........ r19735 | extempore | 2009-11-20 01:49:58 +0100 (Fri, 20 Nov 2009) | 1 line Fix for infinite loop in StringBuilder pointed out by dpp. ........ r19736 | extempore | 2009-11-20 04:50:12 +0100 (Fri, 20 Nov 2009) | 1 line Slightly more fixy fix than the previous fix. ........ r19737 | plocinic | 2009-11-20 10:04:04 +0100 (Fri, 20 Nov 2009) | 1 line closes #1422 ........ r19738 | odersky | 2009-11-20 14:57:22 +0100 (Fri, 20 Nov 2009) | 1 line Simplifiations in collections libraries, enabled by introduction of Self type in TraversableLike. ........ r19739 | odersky | 2009-11-20 14:58:36 +0100 (Fri, 20 Nov 2009) | 1 line new test ........ r19740 | extempore | 2009-11-20 16:16:45 +0100 (Fri, 20 Nov 2009) | 4 lines More world-shaking deprecation work. Using the scala.math package object, updating some @deprecated messages to give realistic alternatives, properly resolving the semantic mismatch between List.-- and diff, its once-recommended but inequivalent alternative. ........ r19742 | prokopec | 2009-11-20 17:11:19 +0100 (Fri, 20 Nov 2009) | 1 line PriorityQueue fixed, should work ok now. ........ r19743 | prokopec | 2009-11-20 17:11:53 +0100 (Fri, 20 Nov 2009) | 1 line Priority queue test. ........ r19744 | prokopec | 2009-11-20 17:12:48 +0100 (Fri, 20 Nov 2009) | 1 line Priority queue test, updated. ........ r19746 | prokopec | 2009-11-20 18:25:08 +0100 (Fri, 20 Nov 2009) | 1 line Changes made in the clean up phase - now the symbols get interned during classload for each symbol literal - references to them reside in static fields. These static fields get initialized in static constructors - the java backend will now identify ctors with static flags and generate a static initializer containing the necessary code. ........ r19747 | prokopec | 2009-11-20 18:29:39 +0100 (Fri, 20 Nov 2009) | 1 line Removed a couple of unneeded comments. ........ r19748 | extempore | 2009-11-20 18:39:49 +0100 (Fri, 20 Nov 2009) | 3 lines Deprecated the Tuple(...) methods in Predef, but at the same time extended the overload out to 22 and moved them into the scala package object. ........ r19749 | odersky | 2009-11-20 19:02:42 +0100 (Fri, 20 Nov 2009) | 1 line Closed #2641 ........ r19750 | prokopec | 2009-11-20 19:06:41 +0100 (Fri, 20 Nov 2009) | 1 line Commented out anonymous function invocation for which Hudson was complaining it couldn't find the classdef. ........ r19751 | extempore | 2009-11-20 19:08:57 +0100 (Fri, 20 Nov 2009) | 2 lines Subtly altered implementation of iterator which does not go into an infinite loop when deprecated "append" is replaced with ++. ........ r19752 | extempore | 2009-11-20 19:09:08 +0100 (Fri, 20 Nov 2009) | 2 lines Tweak to Iterator.++ to keep it from going into an infinite loop on x ++ x. ........ r19753 | prokopec | 2009-11-20 19:17:13 +0100 (Fri, 20 Nov 2009) | 1 line Trying to get the test to pass on the server. ........ r19754 | extempore | 2009-11-20 19:35:52 +0100 (Fri, 20 Nov 2009) | 1 line Eliminated warning about Tuple2 and Tuple3 importing Traversable. ........ r19755 | extempore | 2009-11-20 19:59:30 +0100 (Fri, 20 Nov 2009) | 1 line More deprecation avoidance and some minor smoothings. ........ r19756 | moors | 2009-11-20 20:25:32 +0100 (Fri, 20 Nov 2009) | 3 lines closes #2585: generate more precise Java generic signatures for classes nested in parametric outer classes fix based on review by Martin baseType is your friend ........ r19757 | michelou | 2009-11-20 21:19:41 +0100 (Fri, 20 Nov 2009) | 2 lines updated/extended serialization tests ........ r19758 | extempore | 2009-11-20 21:37:12 +0100 (Fri, 20 Nov 2009) | 1 line Expanding the warning cleansing into -unchecked territory. ........ r19759 | odersky | 2009-11-20 22:02:23 +0100 (Fri, 20 Nov 2009) | 2 lines Closed #2642 ........ r19762 | extempore | 2009-11-21 18:24:29 +0100 (Sat, 21 Nov 2009) | 1 line Applied performance patch and test case from ijuma; closes #2526. ........ r19763 | extempore | 2009-11-21 20:58:05 +0100 (Sat, 21 Nov 2009) | 2 lines Partially addresses #2626 - pattern matcher no longer depends on drop(n) behavior if n < 0. ........ r19764 | extempore | 2009-11-22 00:55:06 +0100 (Sun, 22 Nov 2009) | 2 lines Cleanup of Cleanup. Finally straightening out a bunch of duplicated boxing code in the right location. ........ r19767 | extempore | 2009-11-22 02:26:04 +0100 (Sun, 22 Nov 2009) | 2 lines Fix (I think) for recently introduced MSIL breakage stemming from eliminating deprecation warnings. ........ r19768 | odersky | 2009-11-22 12:32:26 +0100 (Sun, 22 Nov 2009) | 2 lines Made implicit resolution compatible with numeric conformance. ........ r19769 | odersky | 2009-11-22 13:28:57 +0100 (Sun, 22 Nov 2009) | 2 lines Closed #2635 ........ r19773 | extempore | 2009-11-22 17:07:46 +0100 (Sun, 22 Nov 2009) | 1 line Removed all traces of Boxed*Array. New starr. ........ r19776 | odersky | 2009-11-22 19:13:34 +0100 (Sun, 22 Nov 2009) | 2 lines Moved failing test due to fix of #2635 to pending. ........ r19781 | prokopec | 2009-11-22 23:47:08 +0100 (Sun, 22 Nov 2009) | 2 lines Priority queue reverse is undefined - overriden to throw an exception. Reverse iterator seems to have sense - it is overriden and is defined, and some methods in SeqLike are implemented in terms of it. ........ r19787 | extempore | 2009-11-23 13:51:56 +0100 (Mon, 23 Nov 2009) | 1 line A couple more warning fixes I meant to check in with r19758. ........ r19789 | dragos | 2009-11-23 14:58:56 +0100 (Mon, 23 Nov 2009) | 2 lines == for specialized types will not cause boxing anymore ........ r19792 | odersky | 2009-11-23 15:45:44 +0100 (Mon, 23 Nov 2009) | 1 line Closed #1226. Added new test cases. ........ r19793 | malayeri | 2009-11-23 16:16:25 +0100 (Mon, 23 Nov 2009) | 1 line Closed #2552. Changed Iterator.takeWhile and Iterator.filter to avoid recomputing predicate in next and hasNext methods. ........ r19798 | odersky | 2009-11-23 18:50:54 +0100 (Mon, 23 Nov 2009) | 1 line Partial fix for #2683 ........ r19799 | odersky | 2009-11-23 19:12:34 +0100 (Mon, 23 Nov 2009) | 1 line Closed #1545 ........ r19800 | extempore | 2009-11-23 22:03:51 +0100 (Mon, 23 Nov 2009) | 4 lines Partitioned scala.Math and scala.math a little bit. ALL_CAP aliases are deprecated and only in Math. Formerly unavailable members of java.lang.Math which were added in 1.5 are now available in scala.math. ........ r19803 | extempore | 2009-11-24 01:08:32 +0100 (Tue, 24 Nov 2009) | 2 lines Some more XML cleanups. I'm seeing if I can break the compiler dependency on scala.util.automata. ........ r19804 | milessabin | 2009-11-24 02:13:01 +0100 (Tue, 24 Nov 2009) | 1 line Improved completion for locals and import. ........ r19806 | moors | 2009-11-24 10:09:49 +0100 (Tue, 24 Nov 2009) | 5 lines close #2665 and close #2667: use weak conformance in polymorphic case of isApplicable reviewed by: odersky exprTypeArgs now takes a comparison function: isWeaklyCompatible is passed in isApplicable's typesCompatible (to mimic what happens in the monomorphic case) Martin: please review as this is different from my original proposal (that one broke type inference, this one passes all tests and does not slow down quick.comp) ........ r19807 | moors | 2009-11-24 11:15:58 +0100 (Tue, 24 Nov 2009) | 1 line pending test: see #2660, #2691 ........ r19808 | moors | 2009-11-24 11:19:08 +0100 (Tue, 24 Nov 2009) | 1 line close #2626 as specified by Martin ........ r19813 | odersky | 2009-11-24 15:40:04 +0100 (Tue, 24 Nov 2009) | 1 line relaxed rule requiring `override` modifiers so that it's OK if self type contains overridden symbol. ........ r19814 | odersky | 2009-11-24 16:50:06 +0100 (Tue, 24 Nov 2009) | 1 line Closed #2629 #2639 #2669 ........ r19815 | odersky | 2009-11-24 16:57:17 +0100 (Tue, 24 Nov 2009) | 1 line Closed #2696 ........ r19818 | odersky | 2009-11-24 17:07:49 +0100 (Tue, 24 Nov 2009) | 1 line Closed #2698 ........ r19819 | odersky | 2009-11-24 17:12:18 +0100 (Tue, 24 Nov 2009) | 1 line Closed #2664 ........ r19820 | prokopec | 2009-11-24 17:35:09 +0100 (Tue, 24 Nov 2009) | 1 line Added reverse capabilities to PriorityQueue. Seems to work well - tests pass. ........ r19824 | phaller | 2009-11-24 18:11:45 +0100 (Tue, 24 Nov 2009) | 1 line Made mutable.OpenHashMap a MapLike. Closes #2681. ........
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/bug563.scala2
-rw-r--r--test/files/neg/bug700.check2
-rw-r--r--test/files/neg/bug700.scala2
-rw-r--r--test/files/neg/bug875.check4
-rw-r--r--test/files/neg/bug875.scala6
-rw-r--r--test/files/neg/bug910.check4
-rw-r--r--test/files/neg/bug910.scala2
-rw-r--r--test/files/neg/constrs.check2
-rw-r--r--test/files/neg/constrs.scala2
-rw-r--r--test/files/neg/gadts1.scala8
-rw-r--r--test/files/neg/implicits.check2
-rw-r--r--test/files/neg/implicits.scala4
-rw-r--r--test/files/neg/overload.check2
-rw-r--r--test/files/neg/overload.scala2
-rw-r--r--test/files/neg/t0218.scala2
-rw-r--r--test/files/neg/t1422.check4
-rw-r--r--test/files/neg/t1422.scala1
-rw-r--r--test/files/neg/t1477.check5
-rw-r--r--test/files/neg/t1477.scala25
-rw-r--r--test/files/neg/t2179.check9
-rwxr-xr-xtest/files/neg/t2179.scala3
-rw-r--r--test/files/neg/t2641.check39
-rw-r--r--test/files/neg/t2641.scala31
-rw-r--r--test/files/neg/t771.check4
-rwxr-xr-xtest/files/neg/t771.scala5
-rw-r--r--test/files/neg/viewtest.scala16
26 files changed, 157 insertions, 31 deletions
diff --git a/test/files/neg/bug563.scala b/test/files/neg/bug563.scala
index d8e026e656..624b83b1fa 100644
--- a/test/files/neg/bug563.scala
+++ b/test/files/neg/bug563.scala
@@ -1,7 +1,7 @@
object Test {
def map[A,R](a : List[A], f : A => R) : List[R] = a.map(f);
- def split(sn : Iterable[List[Cell[int]]]) : unit =
+ def split(sn : Iterable[List[Cell[Int]]]) : Unit =
for (n <- sn)
map(n,ptr => new Cell(ptr.elem));
}
diff --git a/test/files/neg/bug700.check b/test/files/neg/bug700.check
index 33a67e5094..5c2854069c 100644
--- a/test/files/neg/bug700.check
+++ b/test/files/neg/bug700.check
@@ -1,4 +1,4 @@
bug700.scala:6: error: method foobar in trait Foo is accessed from super. It may not be abstract unless it is overridden by a member declared `abstract' and `override'
- def foobar: unit = super.foobar
+ def foobar: Unit = super.foobar
^
one error found
diff --git a/test/files/neg/bug700.scala b/test/files/neg/bug700.scala
index 7477bb54f6..b08c8b5529 100644
--- a/test/files/neg/bug700.scala
+++ b/test/files/neg/bug700.scala
@@ -3,7 +3,7 @@ trait Foo {
}
trait Bar extends Foo {
- def foobar: unit = super.foobar
+ def foobar: Unit = super.foobar
}
// the following definition breaks the compiler
diff --git a/test/files/neg/bug875.check b/test/files/neg/bug875.check
index d547c8d69c..16a982241e 100644
--- a/test/files/neg/bug875.check
+++ b/test/files/neg/bug875.check
@@ -4,8 +4,8 @@ bug875.scala:3: error: no `: _*' annotation allowed here
^
bug875.scala:6: error: no `: _*' annotation allowed here
(such annotations are only allowed in arguments to *-parameters)
- mkList(xs: _*)
- ^
+ mkList1(xs: _*)
+ ^
bug875.scala:15: error: no `: _*' annotation allowed here
(such annotations are only allowed in arguments to *-parameters)
f(true, 1, xs: _*)
diff --git a/test/files/neg/bug875.scala b/test/files/neg/bug875.scala
index 9c579b0166..38affd5a43 100644
--- a/test/files/neg/bug875.scala
+++ b/test/files/neg/bug875.scala
@@ -1,9 +1,9 @@
object Test extends Application {
val xs = List(4, 5, 6)
val ys = List(1, 2, 3, xs: _*)
- def mkList(x: Int) = List(x)
- def mkList(x: Boolean) = List(x)
- mkList(xs: _*)
+ def mkList1(x: Int) = List(x)
+ def mkList2(x: Boolean) = List(x)
+ mkList1(xs: _*)
def f(x: Int*) = List(x: _*)
diff --git a/test/files/neg/bug910.check b/test/files/neg/bug910.check
index fe4ad4fca4..2bc2d986fa 100644
--- a/test/files/neg/bug910.check
+++ b/test/files/neg/bug910.check
@@ -1,6 +1,6 @@
bug910.scala:4: error: type mismatch;
found : Seq[Char]
- required: scala.Seq[int]
- val y: Seq[int] = rest
+ required: scala.Seq[Int]
+ val y: Seq[Int] = rest
^
one error found
diff --git a/test/files/neg/bug910.scala b/test/files/neg/bug910.scala
index 2f28ea408f..540ee7001d 100644
--- a/test/files/neg/bug910.scala
+++ b/test/files/neg/bug910.scala
@@ -1,7 +1,7 @@
object RegExpTest1 extends Application {
def co(x: Seq[Char]) = x match {
case Seq('s','c','a','l','a', rest @ _*) =>
- val y: Seq[int] = rest
+ val y: Seq[Int] = rest
y
}
}
diff --git a/test/files/neg/constrs.check b/test/files/neg/constrs.check
index 3524709785..4f4a12bc13 100644
--- a/test/files/neg/constrs.check
+++ b/test/files/neg/constrs.check
@@ -8,7 +8,7 @@ constrs.scala:10: error: called constructor's definition must precede calling co
def this() = this("abc")
^
constrs.scala:12: error: called constructor's definition must precede calling constructor's definition
- def this(x: boolean) = this(x)
+ def this(x: Boolean) = this(x)
^
constrs.scala:16: error: type mismatch;
found : Int(1)
diff --git a/test/files/neg/constrs.scala b/test/files/neg/constrs.scala
index 969f593a2d..016df098f0 100644
--- a/test/files/neg/constrs.scala
+++ b/test/files/neg/constrs.scala
@@ -9,7 +9,7 @@ object test {
class Foo(x: Int) {
def this() = this("abc")
def this(x: String) = this(1)
- def this(x: boolean) = this(x)
+ def this(x: Boolean) = this(x)
}
class Bar[a](x: a) {
diff --git a/test/files/neg/gadts1.scala b/test/files/neg/gadts1.scala
index 67aef4f2d9..07200ff7aa 100644
--- a/test/files/neg/gadts1.scala
+++ b/test/files/neg/gadts1.scala
@@ -1,8 +1,8 @@
object Test{
abstract class Number
-case class Int(n: int) extends Number
-case class Double(d: double) extends Number
+case class Int(n: scala.Int) extends Number
+case class Double(d: scala.Double) extends Number
trait Term[+a]
case class Cell[a](var x: a) extends Term[a]
@@ -10,7 +10,7 @@ case class NumTerm(val n: Number) extends Term[Number]
class IntTerm(n: Int) extends NumTerm(n) with Term[Int]
-def f[a](t:Term[a], c:Cell[a]): unit =
+def f[a](t:Term[a], c:Cell[a]): Unit =
t match {
case NumTerm(n) => c.x = Double(1.0)
}
@@ -18,7 +18,7 @@ def f[a](t:Term[a], c:Cell[a]): unit =
val x:Term[Number] = NumTerm(Int(5))
-def main(args: Array[String]): unit = {
+def main(args: Array[String]): Unit = {
val cell = Cell[Int](Int(6))
Console.println(cell)
f[Int](new IntTerm(Int(5)), cell)
diff --git a/test/files/neg/implicits.check b/test/files/neg/implicits.check
index d94e1f27f2..337560f423 100644
--- a/test/files/neg/implicits.check
+++ b/test/files/neg/implicits.check
@@ -3,7 +3,7 @@ implicits.scala:21: error: type mismatch;
required: ?{val +: ?}
Note that implicit conversions are not applicable because they are ambiguous:
both method any2plus in object Sub of type (x: Any)Sub.Plus
- and method pos2int in object Super of type (p: Pos)int
+ and method pos2int in object Super of type (p: Pos)Int
are possible conversion functions from Pos to ?{val +: ?}
f(p+1)
^
diff --git a/test/files/neg/implicits.scala b/test/files/neg/implicits.scala
index be85029660..846591e22d 100644
--- a/test/files/neg/implicits.scala
+++ b/test/files/neg/implicits.scala
@@ -3,7 +3,7 @@ class Pos
class Super
object Super {
- implicit def pos2int(p: Pos): int = 0
+ implicit def pos2int(p: Pos): Int = 0
}
object Sub extends Super {
@@ -17,7 +17,7 @@ object Test {
import Super._
import Sub._
val p = new Pos
- def f(x: int): int = x
+ def f(x: Int): Int = x
f(p+1)
}
diff --git a/test/files/neg/overload.check b/test/files/neg/overload.check
index 0faa97adb1..abfabaf3f2 100644
--- a/test/files/neg/overload.check
+++ b/test/files/neg/overload.check
@@ -1,6 +1,6 @@
overload.scala:10: error: ambiguous reference to overloaded definition,
both method f in class D of type (x: Any)Unit
-and method f in class C of type (x: int)Unit
+and method f in class C of type (x: Int)Unit
match argument types (Int)
(new D).f(1)
^
diff --git a/test/files/neg/overload.scala b/test/files/neg/overload.scala
index 311ea3874b..6ad911e90e 100644
--- a/test/files/neg/overload.scala
+++ b/test/files/neg/overload.scala
@@ -1,5 +1,5 @@
class C {
- def f(x: int) {}
+ def f(x: Int) {}
}
class D extends C {
diff --git a/test/files/neg/t0218.scala b/test/files/neg/t0218.scala
index 282e85e814..319be82a7a 100644
--- a/test/files/neg/t0218.scala
+++ b/test/files/neg/t0218.scala
@@ -6,7 +6,7 @@ trait APQ {
type PP = P
- def pq(numQueens: int, numRows: int) : List[Placement] = {
+ def pq(numQueens: Int, numRows: Int) : List[Placement] = {
List(new PP)
}
}
diff --git a/test/files/neg/t1422.check b/test/files/neg/t1422.check
new file mode 100644
index 0000000000..5931fcb049
--- /dev/null
+++ b/test/files/neg/t1422.check
@@ -0,0 +1,4 @@
+t1422.scala:1: error: private[this] not allowed for case class parameters
+case class A(private[this] val foo:String)
+ ^
+one error found
diff --git a/test/files/neg/t1422.scala b/test/files/neg/t1422.scala
new file mode 100644
index 0000000000..751f05a764
--- /dev/null
+++ b/test/files/neg/t1422.scala
@@ -0,0 +1 @@
+case class A(private[this] val foo:String)
diff --git a/test/files/neg/t1477.check b/test/files/neg/t1477.check
new file mode 100644
index 0000000000..e497637857
--- /dev/null
+++ b/test/files/neg/t1477.check
@@ -0,0 +1,5 @@
+t1477.scala:13: error: overriding type V in trait C with bounds >: Nothing <: Middle.this.D;
+ type V is a volatile type; cannot override a type with non-volatile upper bound
+ type V <: (D with U)
+ ^
+one error found
diff --git a/test/files/neg/t1477.scala b/test/files/neg/t1477.scala
new file mode 100644
index 0000000000..0cc0cd5f7a
--- /dev/null
+++ b/test/files/neg/t1477.scala
@@ -0,0 +1,25 @@
+object Test extends Application {
+ trait A
+ trait B extends A
+
+ trait C {
+ type U
+ trait D { type T >: B <: A }
+ type V <: D
+ val y: V#T = new B { }
+ }
+
+ trait Middle extends C {
+ type V <: (D with U)
+ }
+
+ class D extends Middle {
+ trait E
+ trait F { type T = E }
+ type U = F
+ def frob(arg : E) : E = arg
+ frob(y)
+ }
+
+ new D
+}
diff --git a/test/files/neg/t2179.check b/test/files/neg/t2179.check
new file mode 100644
index 0000000000..e454e117b5
--- /dev/null
+++ b/test/files/neg/t2179.check
@@ -0,0 +1,9 @@
+t2179.scala:2: error: inferred type arguments [scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]{def sameElements[B >: Any](that: Iterable[B]): Boolean}]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}] do not conform to method reduceLeft's type parameter bounds [B >: List[Double]]
+ (Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d))
+ ^
+t2179.scala:2: error: type mismatch;
+ found : (Any, Any) => scala.collection.immutable.IndexedSeq[Double]
+ required: (scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]{def sameElements[B >: Any](that: Iterable[B]): Boolean}]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}, List[Double]) => scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]{def sameElements[B >: Any](that: Iterable[B]): Boolean}]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}
+ (Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d))
+ ^
+two errors found
diff --git a/test/files/neg/t2179.scala b/test/files/neg/t2179.scala
new file mode 100755
index 0000000000..89e22b6e2a
--- /dev/null
+++ b/test/files/neg/t2179.scala
@@ -0,0 +1,3 @@
+object Test {
+ (Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d))
+}
diff --git a/test/files/neg/t2641.check b/test/files/neg/t2641.check
new file mode 100644
index 0000000000..70123bfc58
--- /dev/null
+++ b/test/files/neg/t2641.check
@@ -0,0 +1,39 @@
+t2641.scala:19: error: illegal cyclic reference involving trait ManagedSeq
+ with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A]]
+ ^
+t2641.scala:17: error: illegal inheritance;
+ self-type ManagedSeq does not conform to ManagedSeqStrict[A]'s selftype ManagedSeqStrict[A]
+ extends ManagedSeqStrict[A]
+ ^
+t2641.scala:18: error: illegal inheritance;
+ self-type ManagedSeq does not conform to scala.collection.TraversableView[A,ManagedSeqStrict[A]]'s selftype scala.collection.TraversableView[A,ManagedSeqStrict[A]]
+ with TraversableView[A, ManagedSeqStrict[A]]
+ ^
+t2641.scala:19: error: illegal inheritance;
+ self-type ManagedSeq does not conform to scala.collection.TraversableViewLike[A,ManagedSeqStrict[A],<error>]'s selftype scala.collection.TraversableViewLike[A,Coll,This]
+ with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A]]
+ ^
+t2641.scala:17: error: illegal inheritance;
+ self-type ManagedSeq does not conform to ScalaObject's selftype ScalaObject
+ extends ManagedSeqStrict[A]
+ ^
+t2641.scala:25: error: something is wrong (wrong class file?): trait ManagedSeq with type parameters [A,Coll] gets applied to arguments [], phase = typer
+ trait Transformed[+B] extends ManagedSeq[B, Coll] with super.Transformed[B]
+ ^
+t2641.scala:27: error: something is wrong (wrong class file?): trait ManagedSeq with type parameters [A,Coll] gets applied to arguments [], phase = namer
+ trait Sliced extends Transformed[A] with super.Sliced {
+ ^
+t2641.scala:27: error: illegal inheritance; superclass Any
+ is not a subclass of the superclass ManagedSeqStrict
+ of the mixin trait Transformed
+ trait Sliced extends Transformed[A] with super.Sliced {
+ ^
+t2641.scala:27: error: illegal inheritance; superclass Any
+ is not a subclass of the superclass Object
+ of the mixin trait Sliced
+ trait Sliced extends Transformed[A] with super.Sliced {
+ ^
+t2641.scala:28: error: value managedIterator is not a member of ManagedSeq
+ override def managedIterator = self.managedIterator slice (from, until)
+ ^
+10 errors found
diff --git a/test/files/neg/t2641.scala b/test/files/neg/t2641.scala
new file mode 100644
index 0000000000..5529035f79
--- /dev/null
+++ b/test/files/neg/t2641.scala
@@ -0,0 +1,31 @@
+import scala.collection._
+import scala.collection.generic._
+import scala.collection.mutable.Builder
+
+
+abstract class ManagedSeqStrict[+A]
+ extends Traversable[A]
+ with GenericTraversableTemplate[A, ManagedSeqStrict]
+{
+ override def companion: GenericCompanion[ManagedSeqStrict] = null
+
+ override def foreach[U](f: A => U): Unit =
+ null
+}
+
+trait ManagedSeq[+A, +Coll]
+ extends ManagedSeqStrict[A]
+ with TraversableView[A, ManagedSeqStrict[A]]
+ with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A]]
+{ self =>
+
+ override def underlying = throw new Exception("no underlying")
+
+ //trait Transformed[+B] extends ManagedSeq[B] with super.Transformed[B]
+ trait Transformed[+B] extends ManagedSeq[B, Coll] with super.Transformed[B]
+
+ trait Sliced extends Transformed[A] with super.Sliced {
+ override def managedIterator = self.managedIterator slice (from, until)
+ }
+
+}
diff --git a/test/files/neg/t771.check b/test/files/neg/t771.check
new file mode 100644
index 0000000000..c0d1e002f8
--- /dev/null
+++ b/test/files/neg/t771.check
@@ -0,0 +1,4 @@
+t771.scala:4: error: trait Iterator is abstract; cannot be instantiated
+ def c[A](it:java.util.Iterator[A]) = new scala.Iterator[A]
+ ^
+one error found
diff --git a/test/files/neg/t771.scala b/test/files/neg/t771.scala
new file mode 100755
index 0000000000..26bf441648
--- /dev/null
+++ b/test/files/neg/t771.scala
@@ -0,0 +1,5 @@
+class Foo {
+ def a = c(b)
+ def b[List[AnyRef]] = new java.util.Iterator[List[Object]] { }
+ def c[A](it:java.util.Iterator[A]) = new scala.Iterator[A]
+}
diff --git a/test/files/neg/viewtest.scala b/test/files/neg/viewtest.scala
index 778e672d91..5e7d624d23 100644
--- a/test/files/neg/viewtest.scala
+++ b/test/files/neg/viewtest.scala
@@ -12,13 +12,13 @@ trait Ordered[+a] {
*/
def compareTo [b >: a <% Ordered[b]](that: b): Int
- def < [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) < 0
+ def < [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) < 0
- def > [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) > 0
+ def > [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) > 0
- def <= [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) <= 0
+ def <= [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) <= 0
- def >= [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) >= 0
+ def >= [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) >= 0
}
@@ -30,9 +30,9 @@ object O {
case _ => -(y compareTo x)
}
}
- implicit def view2(x: char): Ordered[char] = new Ordered[char] {
- def compareTo [b >: char <% Ordered[b]](y: b): Int = y match {
- case y1: char => x - y1
+ implicit def view2(x: Char): Ordered[Char] = new Ordered[Char] {
+ def compareTo [b >: Char <% Ordered[b]](y: b): Int = y match {
+ case y1: Char => x - y1
case _ => -(y compareTo x)
}
}
@@ -106,7 +106,7 @@ object Test {
Console.println(t.elements)
}
{
- var t: Tree[List[char]] = Empty
+ var t: Tree[List[Char]] = Empty
for (s <- args) {
t = t insert toCharList(s)
}