1.+(2) - what is it? Is it 3 or 3.0? Come scala 2.11 you won't
have to not know (or even not know there's something you don't know.)
1.+(2) will then be safely considered equivalent to 1 + 2, because
any dot not followed by a digit is not part of a number.
Primarily, that's these forms: 3.f 3.d 3.
If you prefer an error to a warning, use -Xfuture.
Let's deprecate 012 == 10 too! (See comment.) References SI-5089, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25985 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Tweaked implementation of invalidClassName method
to exclude *$class clasess from the set of invalid
names. It's not exactly clear what was the intent
of this method in first place so I'm not sure if
it's the best way to fix SI-5176. Added test-case
that covers this issue.
Fixes SI-5176. Review by odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25982 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Enabled fancy type inference if opt.virtPatMat is true so one need
not enable -Xexperimental to use El Virto (since I keep wasting time on
edge cases arising from unrelated -Xexperimental-enabled features.)
No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25980 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
I should know better than to behave as if usable inferences can
be drawn from a comment like "SYNTHETIC because of DEVIRTUALIZE".
Maybe it was even true when it was written, but no more.
Closes SI-5178, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25979 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
the long-term goal is to separate:
- analyzing patterns and turning them into extractors that are flatMap'ed and orElse'ed,
where the structure is expressed in a small intermediate language that
preserves more pattern matching-specific meaning than trees
- more advanced analyses on the intermediate representation
- code generation (patmat IR -> Scala AST) -- this should be trivial
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25973 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Created MsilFile as a wrapper around MSILType so we can use AbstractFile
everywhere. This initial attempt is fairly ham-fisted, since I'm not
sure exactly how things are used on the msil side; but it is imposing
undue complication on the loaders. Review by magarcia.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25972 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Some philistine who thinks "binary compatibility" is
a computer dating site changed the names of public vals in
Predef classes. I restored and then deprecated them.
REVIEW BY MOORS.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25970 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
wraps the call to a bridged synthetic unapply(Seq) in a defensive if-test:
if (x.isInstanceOf[expectedType]) real.unapply(x.asInstanceOf[expectedType]) else None
NOTE: the test is WRONG, but it has to be due to #1697/#2337 -- once those are fixed, this one should generate the expected output
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25966 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Check number of arguments before jumping to conclusion that
a primitive seeming structural call might really be primitive.
Closes SI-4766, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25965 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit and the two subsequent commits were contributed by:
Todd Vierling <tv@duh.org>.
I combined some commits and mangled his commit messages, but all the
credit is his. This pursues the same approach to classfile reduction
seen in r19989 when AbstractFunctionN was introduced, but applies it to
the collections. Thanks to -Xlint it's easy to verify that the private
types don't escape.
Design considerations as articulated by Todd:
* Don't necessarily create concrete types for _everything_. Where a
subtrait only provides a few additional methods, don't bother; instead,
use the supertrait's concrete class and retain the "with". For example,
"extends AbstractSeq[A] with LinearSeq[A]".
* Examine all classes with .class file size greater than 10k. Named
classes and class names ending in $$anon$<num> are candidates for
analysis.
* If a return type is currently inferred where an anon subclass would be
returned, make the return type explicit. Don't allow the library-private
abstract classes to leak into the public namespace [and scaladoc].
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25962 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Moved all the eagerly evaluated bits to the top of the file so
I can see them all at once. Let a dozen vals unroll up front so
initialization is more predictable. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25957 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
As near as I can tell, -Xcheckinit was failing because a var was read
too early as null rather than waiting for it to be set to its initial
value, null. I guess that's a defensible warning, since one might change
it away from null. Organized the vars in that file better. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25954 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Another page in the storied history of "call .tpe when one should have
called .tpeHK", in this case leading to a crash of stacktraciness.
Closes SI-5152, review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25953 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Another page in the storied history of "check the normalized type,
then act on the unnormalized type", in this case leading to a tight
loop of foreverness. Closes SI-5156, review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25952 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Hardened the repl against a bunch of erroneous conditions.
Added a :reset command which causes the repl to forget everything
you have told it. Added classloader tracing when repl tracing is
enabled. :reset is not that useful in its current form but
it's the precursor to something more interesting. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25941 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
Exception handling beset by entropy. Restored some order. The output of
the test may not be stable across platforms, in which case I'll take the
usual step of reverting it, thereby achieving victory over failure by
testing nothing instead of testing something. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25938 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
With this change, one can use the reflective compiler with the
scala libs on the boot classpath (the default) or not (with -nobootcp)
and it will work either way. Maybe it will work in sbt now too, but
I haven't tried it. Since I bet you will try it, review by grek.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25932 5e8d7ff9-d8ef-0310-90f0-a4852d11357a