| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Improved structural type error messages, and other error message related
boosts. Closes SI-4877, review by odersky.
|
|
|
|
|
|
|
|
| |
Fixed bug in the disambiguation of f(foo='bar') style method calls in
the presence of overloading, parameterization, and by-name arguments.
Took the opportunity to clean things up a little bit. Closes SI-4592,
review by rytz.
|
|
|
|
|
|
|
| |
Disallowed implicit modifier on auxiliary constructors, since it either
silently accomplishes nothing or crashes the compiler. If it should do
something useful let me know. Closes SI-4882, review by odersky.
|
|
|
|
|
|
|
|
| |
Don't want to chase NPEs around for the rest of my life. Created
"NoCompilationUnit" and "NoSourceFile" objects to represent not-present
versions of these items. Seems a lot better than null. References
SI-4859, got past NPE only to uncover the actual problem. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attacked classpaths to get "." off of it when it's not actually
specified. The commit makes me nervous, but there's no invisible way to
fix something like this.
** Attention, this commit changes classpath handling **
We desperately need some way of testing that the classpath has certain
qualities and does not have others; partest is not that way. Closes
SI-4857, no review.
|
| |
|
|
|
|
|
|
|
| |
Rewrote the case class synthetic equals method to be more efficient and
to cause fewer problems for compiler hackers who are always saying stuff
like "the only place this comes up is case class equals..." No review.
|
|
|
|
|
| |
Issue a warning about classes/objects inside package objects, no review.
|
|
|
|
|
|
|
|
| |
Cleanups in Namers and AddInterfaces emerging from bugfixing attempts
and comprehension pursuits. I appear to have accidentally fixed at least
one bug, as there are new (correct) warnings when building the compiler
involving permanently hidden imports. No review.
|
|
|
|
|
|
| |
Made error messages like "object List is not a value" be a little more
helpful about why that is. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sped up traversal over mutable maps by a factor of two.
There was this comment in HashTable explaining why foreach was
implemented in terms of iterator. /*
* We should implement this as a primitive operation over the
* underlying array, but it can cause a behaviour change in edge cases
* where:
* - Someone modifies a map during iteration
* - The insertion point is close to the iteration point.
*/
Item 1: foreach and iterator didn't behave the same if the map was
mutated in the midst of the traversal anyway. Item 2: protecting some
particular undefinition of inherently undefined behavior is a pretty
unconvincing reason to impose a 2x penalty on foreach.
Here are the before/after times for traversing the keys with foreach
vs. with iterator. Same impact on values and on the map itself. The
benchmark code is included in this commit.
before: foreach 143700900 iterator 143848900
after: foreach 67024400 iterator 144890300
Respecting the fact that this might be causing some behavior somewhere
to change, even though it would be pretty sick to be relying upon it,
** ATTENTION! POSSIBLE BEHAVIOR CHANGE! **
Review by dragos.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output generation (but only then, since otherwise we're not creating the
jar):
1) -Xmain-class foo.Bar will give the jar a Main-Class of foo.Bar 2)
Alternatively, if there is only one runnable program, that will be
the Main-Class 3) Always, the jar's manifest will have an entry for
Scala-Compiler-Version.
Not very relatedly, a warning is now issued when a module has a main
method but a runnable program will not be generated. Closes SI-4861.
This represents an opening step toward automatically recognizing
mismatched bytecode situations: coarse, but useful and safe. Review by
mirco.
|
|
|
|
|
|
|
|
| |
LiftCode works again, now integrated with new reflection library.
Other changes: def Literal(x: Any) has been deprecated, and all its uses removed.
Modifiers has lost positions as fourth case class argument; is now a field, mirroring Tree.pos (this removes junk in patterns and makes reification simpler). Review by extempore.
|
| |
|
|
|
|
|
| |
Moved test out of pending, closes SI-3628, no review.
|
|
|
|
|
|
| |
Disabled all the old scala.reflect._ tests which are now crash-failing,
no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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.
|
|
|
|
|
|
|
|
| |
Expression type argument instantiation should not fail in a context
expecting Unit if there is any valid instantiation, because value
discarding should kick in and offer a literal (). Closes SI-4853, review
by odersky.
|
| |
|
|
|
|
|
|
| |
Scaladoc shouldn't drop type arguments to aliased tuple. Related to
SI-4676. Review by pedrofurla.
|
|
|
|
|
|
|
| |
Changed forwarders not to generate final methods, which otherwise would
induce VerifyErrors anytime the companion class was subclassed and had a
method with the same signature. Closes SI-4827, no review.
|
|
|
|
|
| |
Test case closes SI-4172 - I think the output is right anyway - review by rytz.
|
|
|
|
|
| |
A few tests for pending and non-pending, no review.
|
|
|
|
|
|
| |
"Freed the lisp test." Tweaked partest defaults a little in the hopes
that seth tisue is correct in his analysis. No review.
|
|
|
|
|
|
|
|
|
|
| |
Fix/workaround for inliner bug uncovered by finalizing Option methods.
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.
|
|
|
|
|
| |
No review.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per discussion documented in SI-1799, brought back the ProductN
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.
|
|
|
|
|
|
|
| |
Restored test case for SI-2873 which hubert had callously deleted back
when it was briefly irrelevant. It would have been failing were it
around, but now it passes. Closes SI-2873, no review.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modified erasure so we have enough information to determine whether 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.
|
|
|
|
|
|
|
|
| |
Fixed adriaan's patch for type constructor inference. The problem 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.
|
|
|
|
|
|
|
|
|
| |
Workaround for scalacheck calling System.exit during testing. 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.
|
|
|
|
|
|
| |
Brought scalacheck up to date with scalacheck trunk (rev 06612e965d) and
rebuilt jar against r25318, no review.
|
|
|
|
|
|
| |
Reverting recent type constructor patch until I can see why scalacheck
is getting blinkered by it. No review.
|
|
|
|
|
| |
Contributed by Daniel C. Sobral.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed a big bug in type constructor unification caused by considering
only the parents rather than all the base types. This fix is a testament
to the power of haranguing people in bars when you are deeply offended
by a bug, like someone was by this one:
def f[CC[X] <: Traversable[X]](x: CC[Int]) = ()
f(1 to 5) // did not compile! Fear not, it does now
Review by moors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes to scaladoc include:
- fixed transformation of Code(text) into HTML tag <code> - added tool
tips for deprecated entities (classes, methods) using the 'title'
attribute - added syntax highlighting of Scala source code in generated
<pre> blocks (CSS colors are defined in lib/template.css)
Here are several examples of highlighted Scala code:
scala.App
scala.Application
scala.Enumeration
scala.Function1
scala.Function2
scala.native
scala.Option
scala.Proxy
scala.specialized
scala.throws
scala.unchecked
scala.actors.Actor
scala.annotation.deprecatedName
scala.annotation.elidable
scala.annotation.switch
scala.collection.DefaultMap
scala.collection.JavaConversions
scala.collection.JavaConverters
scala.collection.LinearSeqLike
scala.collection.MapLike
scala.collection.SetLike
scala.collection.TraversableLike
scala.collection.immutable.NumericRange
scala.collection.immutable.Range
scala.collection.immutable.Stream
scala.collection.mutable.BufferLike
scala.concurrent.pilib
scala.io.Position
scala.reflect.BeanProperty
scala.reflect.Manifest
scala.testing.Benchmark
scala.util.DynamicVariable
scala.util.control.Breaks
scala.util.control.ControlThrowable
scala.util.control.Exception
scala.util.control.TailCalls
scala.util.logging.Logged
scala.util.parsing.combinator.testing.Tester
scala.util.parsing.json.JSON
scala.util.regexp.WordExp
scala.xml.factory.LoggedNodeFactory
scala.xml.parsing.ConstructingParser
|
|
|
|
|
|
|
| |
prohibit case-to-case inheritance instead of issuing warning. closes
#4109. review by extempore, since it should make your life much easier
in the pattern matcher
|
|
|
|
|
|
| |
Don't enter into same line infinite recursion when erroneous code
involves a self-normalizing type alias. Closes #3240, review by moors.
|
| |
|
| |
|
|
|
|
|
|
| |
Bounded wildcard types arising during pattern type inference can cause
unnecessary crashes. Closes #1048, review by odersky.
|
|
|
|
|
|
| |
Catch type projections even when they disguise themselves as stable via
singleton bounds. Closes #1431, review by odersky.
|
|
|
|
|
|
|
|
| |
A response to adriaan's last lub commit of the housekeeping and pretty
printing variety. Non-invasive surgery, don't worry martin. Simplified
the input to lublist a bit. Includes illustrative test case for current
brand of lub failures. Review by moors.
|
|
|
|
|
|
| |
Suppressed an error in type constructor bounds checking which was
obscuring the meaningful error to follow. Review by moors.
|
|
|
|
|
| |
Making power mode startup a little less glacial, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type mismatches, for real this time. :power mode goes to phase typer
automatically.
You can get the symbols for repl-defined names more directly:
scala> case class Bippy(x: Int)
defined class Bippy
scala> intp.terms("Bippy")
res1: intp.global.Symbol = object Bippy
scala> intp.types("Bippy")
res2: intp.global.Symbol = class Bippy
scala> intp("Bippy") // tries type first
res3: intp.global.Symbol = class Bippy
scala> intp("scala.collection.Map") // falls back to fully qualified
res4: intp.global.Symbol = trait Map
I changed the implicit which used to install "tpe" and "symbol" to
install "tpe_" and "symbol_" because it was too easy to do something you
didn't mean to, like calling x.tpe where x is a Manifest.
Said implicit now handles manifest type arguments, so you can get the
full translation from a manifest representation to a compiler type, at
least for simple types and only as much as manifests work, which is not
that much. Fortunately that situation is all changing soon.
scala> List(List(1, 2, 3)).tpe_
res5: power.Type = List[List[Int]]
scala> res5.typeArgs
res6: List[power.global.Type] = List(List[Int])
Review by moors.
|