because I can't be sure what to do with some of this) really this
code is certainly not correct, please review by odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25414 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
-Ywarn-adapted-args // also included in -Xlint
-Yno-adapted-args
The former warns when a () is inserted or an argument list is implicitly
tupled. The latter errors under the same conditions. Using these options
I found several bugs in the distribution which would otherwise be nearly
impossible to spot. These bugs were innocuous (I think) but similar bugs
could easily be (and have been) otherwise.
Certain particularly threatening scenarios are at minimum warned about
regardless of options given. Closes SI-4851, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25410 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
due to java breakage, on the principle of "first, do no harm." If there is
some rationale why these methods must be made final, let's at least get
it documented. Review by dragos.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25408 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
expecting Unit if there is any valid instantiation, because value discarding
should kick in and offer a literal (). Closes SI-4853, review by odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25407 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
induce VerifyErrors anytime the companion class was subclassed and had a
method with the same signature. Closes SI-4827, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25392 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Something in the backend is leaving open but empty blocks in the worklist.
Rather than freaking out at the merest mention of an empty block, I
quietly remove the empty ones. A proper fix will involve not leaving
empty blocks lying around but we're on a schedule here people.
Review by dragos.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25383 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Escaping of control characters should be performed for
both Char and String constants. This is useful when
printing trees of a program that contains control
character as constants. Before that fix, one could get
really broken output that was hard to read.
Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25366 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
which touch lots of files, the time is ripe for various search/replace
improvements which have stacked up. This one is the replacement of
all "if (settings.debug.value) log" with "debuglog" since as noted
in a recent commit, the inliner will take care of that for you. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25352 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
decisions so they can be modified, something we need to do to fix
long-standing problems with inner classes. It's not easy. This
commit doesn't actually change much, it's primarily setup. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25351 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
traits and synthesized them into case classes. It's -Xexperimental for
now because there may be minor implications for existing code which
should be discussed. And also because I snuck in another "improvement"
but it's probably too dangerous to be touching productIterator directly
and it should go into something else.
scala> case class Bippy(x: Int, y: Int)
defined class Bippy
scala> Bippy(5, 10).productIterator
res0: Iterator[Int] = non-empty iterator
^^^----- as opposed to Iterator[Any]
There is an even better idea available than lubbing the case class field
types: it starts with "H" and ends with "List"...
Review by oderksy.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25336 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
back when it was briefly irrelevant. It would have been failing were
it around, but now it passes. Closes SI-2873, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25327 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
When generating signatures, one must be careful finding the name
of a class, because sometimes things with a name like "Foo" need
to appear in signatures as "Foo$". I could really use some help
establishing tests here. Here's the diff of RedBlack's javap:
< const #81 = Asciz ()Lscala/collection/immutable/RedBlack<TA;>.Empty;;
---
> const #81 = Asciz ()Lscala/collection/immutable/RedBlack<TA;>.Empty$;;
RedBlack and RedBlack$Empty$ are the only classfiles in the library
outside of swing which are affected, which nicely explains their frequent
appearance in past tickets.
Review by grek.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25326 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
I think it a reasonable goal that one should be able to do the following
and have some chance of seeing anomalies before firing up advanced text
processing tools:
scalac -Ylog:all a.scala
At least until/unless we have some way of generating output in between
"user-level visible warnings" and "notice of interest once you're
peeking under the hood." As a rule of thumb, any code which echoes a
thousand lines when compiling HelloWorld should be gently shoved into
debuglog. (Or anything which is sure to print for every classfile,
every method, etc. etc.) Especially, any code which is going to simply
reference Tuple2 and then echo a line for every specialized variation of
that class is being unreasonably taxed.
While I was quietizing, I changed various 'if (settings.debug.value)
log' usages to call debuglog. Hey everyone, you can do this without
penalty now, the inliner turns around and inlines the same code, and
it's so much less unsightly. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25325 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
we need to use scala or java erasure semantics. This fixes the runtime
failure illustrated here:
% scala29 -e 'java.util.Collections.max(null)'
java.lang.NoSuchMethodError: java.util.Collections.max(Ljava/util/Collection;)Ljava/lang/Comparable;
Review by odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25323 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
with haranguing people in bars about bugs is that the fixes with
which they provide you may be flawed. Fortunately moors has this
novelist on retainer. Review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25322 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Not sure exactly what the sequence of events is here: I found
the exit problem months ago and committed code to scalacheck
to make that configurable, and then didn't see it again until
recently, but I don't think it was ever addressed. This is
just a bandaid. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25320 5e8d7ff9-d8ef-0310-90f0-a4852d11357a