Commit Graph

3226 Commits

Author SHA1 Message Date
prokopec 295d07a78f Fixed an overflow which occurs in hashtable size computations. Fixes #4678.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25112 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-20 13:36:24 +00:00
extempore f74603f0eb Fixed an issue with higher kinded type inference on constructors
without any help from adriaan.  Provisionally notched belt.
Wrapped up as many tickets as I added characters of code.
Closes SI-3343, SI-4018.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25110 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-19 21:43:53 +00:00
extempore e2ea433361 The usual unbreaking of broken builds, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25106 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-18 18:37:55 +00:00
extempore 676685cb71 Go back to printing the message that transcript pastes can be
finished with ctrl-D.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25100 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-16 19:40:59 +00:00
moors c1ebd4526b closes #4692: unification in type constructor inference now widens *and* dealiases when necessary
in 2.8.1 implicit conversion search started with a widened type, so that combo never came up

no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25092 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-15 16:32:38 +00:00
extempore b16ca702ec Update manually created tree which was calling Predef.error
to call scala.sys.error instead.  Created convenience functions
in Definitions for getting package objects akin to those for
getting classes and objects.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25089 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 22:48:22 +00:00
moors ae6f3912d8 closes #4547. parts now also looks in HasMethodMatching-style refinedtype's, so that the argument types of the method we're looking for contribute to the implicit scope.
review by rompf -- odersky may want to take a quick look and update the spec

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25087 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-14 12:41:48 +00:00
extempore eb7327eac0 Test case for implicits which unwrap typeclasses, something which
must really live on the edge given the multiple ways we've busted
it lately.  Also some Array/signature and repl tests.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25084 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-13 20:51:57 +00:00
extempore 2acedb2c75 Views using methods implemented in terms of isEmpty (in particular,
headOption and lastOption) were traversing the collection twice up
to the nonEmpty element, because "if (isEmpty) None else Some(head)"
means calling isEmpty separately from head. I overrode those methods in
TraversableViewLike to avoid the second traversal.

This leaves at least init and tail still in that boat, but they were
getting too involved.

How do I say "review by pool of reviewers", who can help set that up? In
the meantime no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25083 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-13 20:51:39 +00:00
kzys ff44a4aaef The '#' sign may easily to lead to problems, So we use '_' instead of '#'. Closes #4641.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25077 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 05:18:31 +00:00
extempore 45801b3684 Don't issue unchecked warnings on higher-kinded types.
Closes #1439, review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25075 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:25:26 +00:00
extempore c37d2b8eb6 Fix for wrong results from groupBy on views. Closes #4660, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25074 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:25:07 +00:00
extempore 1750815064 Reverts r25051 due to witnessed movement of scalaz in the noncompiling
direction.  Postmortem help I hope in the review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25073 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-12 02:24:51 +00:00
extempore 4852d2dc62 A test case demonstrating some of the issues with DelayedInit.
References #4680.  Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25067 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 22:38:17 +00:00
extempore b97a492449 Compilation of spec-List enters an infinite loop under -optimise,
disabling in the hopes of seeing a new build before I die.  I'll put
it back.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25066 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 18:42:56 +00:00
extempore 9b113642b6 Tweaks repl tests to enforce -Yrepl-sync and other setup on all
clients.  Also includes some more why-do-tests-hang bosons for the
particle accelerator in case that doesn't wrap it up.  I think it
will though, because now constrained-types is the only one which
failed and it's also the only one which overrides Settings.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25065 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-10 17:32:05 +00:00
extempore 9ec7560243 Modified erasure not to generate instance tests for statically known
types. It appears the production of types like "Foo with Bar" in the
pattern matcher (where the scrutinee is known to be Foo) has been a
major contributor of suboptimal pattern matches. I will also fix it in
the matcher, but it makes sense to catch it in erasure as both a check
on the matcher and because they may come from elsewhere too. Review by
odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25061 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-07 18:06:34 +00:00
extempore 7307d1e2c4 Lisp test wins again, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25060 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-07 06:09:15 +00:00
extempore 8690cc53b4 Proliferating the number of debugging modes because it's still way
too hard to see what's going on in there.  Until we get hubert's type
debugger with its whiz-bang whizbanginess, we'll have to struggle
along with somewhat prettier ascii.  This introduces:

  -Yinfer-debug

which tries to print in readable fashion what is happening in the worlds
of inference and implicit search.  It should be made a bit more complementary
and less overlappy with -Ytyper-debug.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25059 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-06 23:53:50 +00:00
extempore 9e55c7dbf4 Carved out access exception for java protected statics, which
otherwise cannot be accessed from scala.  Changes close status
of #1806, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25056 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-06 01:00:48 +00:00
extempore af61027ad0 More polishing up repl power mode, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25054 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-03 08:21:22 +00:00
extempore a4f7670e1c More adjustments to repl parsing to accomodate inaccurately
positioned parse trees.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25052 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-01 18:34:20 +00:00
extempore e17ee363c1 The eagerly awaited companion commit to r23622, the surprise hit
of last winter.  Singletons now have the singleton type inferred in
monomorphic contexts as well.  In english:

  scala> object X
  defined module X

  scala> def f = X
  f: X.type

Wait, that's not english.  English review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25051 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-06-01 05:15:49 +00:00
extempore daadd46d6d Fixed a repl regression with parentheses handling, reminding me
we really need that honest parser phase which doesn't betray us
with parentheses abandonment and dramatic desugarings.  I'll
promote it from page 14 to page 11.  Closes #4661, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25050 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-31 19:50:08 +00:00
extempore a9ad2506d8 A getter with type params is still a getter. Closes #4237.
There were two distinct bugs in here, which if I ran the world
would be a wakeup call that robust software cannot emerge from
thousands of lines of low-level AST matching.  In case you are
frozen in suspense: I do not run the world.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25048 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-31 09:02:29 +00:00
extempore cf97e07bad Restored the lisp.scala test. I already restored the intepreter
test in r25038, so closes #4512, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25047 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-31 05:09:18 +00:00
extempore bf686c551f Cleaning up power mode import issues (and the amazing first power
mode test) no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25046 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-31 05:08:53 +00:00
extempore d7b3619200 Now :t types declarations as well as expressions, and cleans up
the output the same way the repl does so stray unsolved type constraints
don't befuddle anyone.  Closes #4391, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25041 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-29 21:30:29 +00:00
extempore 0a529683e3 Give some feedback on invalid :type expressions. Closes #4556, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25040 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-29 20:20:17 +00:00
extempore 2f78741112 Fixed a crasher in the scanner when unicode escape sequences offered
up EOF before completion. Also made the repl a little more robust against
crashers in scalac. Treat it like a hostile witness! Closes #4584, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25039 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-29 20:19:55 +00:00
extempore 41e3a9ab18 Each of the three commits preceding this are to correct
regressions which would have been caught by the interpreter test
and never checked in in the first place, were it not disabled.
The windows tax claims another victim.  Or three victims.

Re-enabled the interpreter test.  No way for me to know if it will
pass everywhere without trying it.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25038 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-29 18:41:46 +00:00
extempore 5c7973714b Fixing an interpreter output regression and updated repl debugging
and tracing code.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25037 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-29 18:41:30 +00:00
extempore faa58441fb Yikes, prependToList was violating List immutability.
Closes #4656, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25033 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-28 23:28:11 +00:00
extempore d56aeddfa3 Overcoming limitations of the repl, multiple-tree lines and assignments.
The best part of nicely documented limitations is that you can stare at the
same comment for years and then the day comes when you give it the heave-ho.

Exhibit A (regarding a single bare expression): "This is necessary due to it
being hard to modify code at a textual level, and it being hard to submit an
AST to the compiler." Yes, it IS hard to modify code at a textual level (see
enclosed patch) but we won't let that stop us anymore.  Closes #4578.

Exhibit B (regarding the left hand side of assignments having to be Ident):
"An unfortunate limitation." Unfortunate no longer! No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25032 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-27 00:10:39 +00:00
extempore 83d8bd6d8b Finished reverting the misbegotten r23262, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25028 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-26 04:43:01 +00:00
extempore c0ab0bbe77 Fix for failing { val x = classOf[List[_]] } introduced by paulp
in r23262.  I already had this in mind (see comments of #4419) but I was
holding back in the runup to 2.9.  Closes #4419, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25015 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-23 20:36:30 +00:00
extempore 571f14be57 Reverts a change as a tribute to the performance gods, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25010 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-23 01:21:52 +00:00
extempore 679d803402 Regression in Enumeration caused some nullary methods to pose
as fields.  Closes #4570, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25008 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-22 18:25:03 +00:00
extempore fffe967a9c Making Range creation less slow, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25007 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-21 17:46:14 +00:00
extempore f5218c91f9 Removes SUnit (long deprecated!) from the standard library.
the relatively small number of partest tests in Scala's suite that were still
using SUnit now either just use regular asserts, or they print stuff that
partest checks with a .check file. Also fixed some bad indentation, removed
ancient useless-looking commented-out code, etc.

Contributed by Seth Tisue (way to go seth) no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24995 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-19 20:06:19 +00:00
extempore 2c61a1224e Suppress unwanted noise generated by javac when compiling test case for #1263.
formerly the test case caused this to be printed:
  Note: test/files/pos/t1263/Test.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
we suppress this using @SuppressWarnings.

Contributed by Seth Tisue, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24994 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-19 20:05:44 +00:00
extempore 80ed6e2693 Apparent assumption that Literal(0) would be adapted to Literal(0.0f)
as necessary mercilessly invalidated.  Fixed mkZero to account for all
types explicitly.  Closes #4617, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24993 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-19 18:08:15 +00:00
prokopec 6376b32a46 Fixes and closes #4608.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24991 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-19 14:04:13 +00:00
dragos 991adb68f7 Fixed #4593. Don't box Nothing types. review by extempore, odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24986 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-17 10:57:28 +00:00
odersky 921a0e073d Closes 4560. Review by dragos.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24968 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-16 14:37:10 +00:00
extempore 78f303c9a6 Temporarily sending lisp.scala to be interpreter.scala's equally
memory hungry buddy in pending.  References #4512.  This should be
straightened out imminently, but I will solve this more easily by
looking forward, not backward.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24964 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-15 04:54:05 +00:00
extempore 65d8323d2d Fix for view+groupBy closes #4558, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24956 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-14 16:54:42 +00:00
dragos 7e470666da Regenerated automated tests for inner objects. This time it checks for both
single threaded and multi-threaded access, plus private objects. Should catch
most possible nesting of objects.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24934 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-11 15:00:05 +00:00
dragos 93d7b279ae Renaming the inner objects test file. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24933 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-11 15:00:01 +00:00
odersky 9f640e544b New test. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24925 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-05-11 12:16:21 +00:00