| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
tools.cmd.CommandLineParser uses a small hand-rolled parser
TODO: replace partest's usage of scala.tools.nsc.util.CommandLine
by scala.tools.cmd.CommandLine
|
|\
| |
| | |
Spin off xml library as scala-library-xml.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When there's no Predef.$scope but xml is being used,
the compiler aliases scala.xml.TopScope to $scope.
There must be a scala.xml package when xml literals were parsed.
For compatibility with the old library, which relied on $scope being in scope,
synthesize a `import scala.xml.{TopScope => $scope}` when xml is needed,
but there's no Predef.$scope and the old library is detected (scala.xml.TopScope exists).
|
| |
| |
| |
| |
| |
| | |
Copied the following files from scala.xml to ast.parser.xml:
- MarkupParsers differs from scala.xml.MarkupParsers only in the first 17 lines
- Utility.scala was refactored and reduced (also includes TokenTests)
|
| |
| |
| |
| | |
Inlined TextBuffer.
|
| | |
|
| |
| |
| |
| |
| |
| | |
runtime.ScalaRunTime.stringOf's behavior has changed slightly:
Call the object's `toString` for all classes in `scala.xml._`,
instead of only for `Node` and `MetaData` (old behavior).
|
| |
| |
| |
| | |
Added deprecated conversions in xml.Elem to preserve source compatibility.
|
|\ \
| | |
| | | |
SI-7569 Fix end position in PostfixSelect tree
|
|/ /
| |
| |
| |
| |
| |
| | |
introduced in 5b54681: the end position of Postfix operators should
take the operator length into account.
review by @som-snytt
|
|\ \
| | |
| | | |
SI-7433 Fix spurious warning about catching control throwable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the same vein as SI-6994, we have to be careful not to warn
about synthetic code. In that case, the spurious warnings came
because we warned in the typechecker, which was also called in
erasure. In this case, we are issuing the warning in Uncurry,
so we must be mindful of the pattern matchers translations of
non-trivial catch patterns, which look like:
case (ex8 @ _) => {
<synthetic> val x5: Throwable = ex8;
case11(){
if ({
case14(){
if (x5.$isInstanceOf[NullPointerException]())
matchEnd13(true)
else
case15()
};
case15(){
if (x5.$isInstanceOf[RuntimeException]())
matchEnd13(true)
else
case16()
};
case16(){
matchEnd13(false)
};
matchEnd13(x: Boolean){
x
}
})
This commit detects that `ex8` is synthetic and disables the warning.
|
|\ \ \
| | | |
| | | | |
SI-7439 Avoid NPE in `isMonomorphicType` with stub symbols. …
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`originalInfo` can return null for stub symbols; deal with that
as we used to before a regression in 016bc3db.
After this change, we can once again delete A_1.class and still compile
code instantiating B_1. (A_1 is only referred to in a method signature
of B_1 which is not called from our code.)
scala> new B_1
warning: Class A_1 not found - continuing with a stub.
res0: B_1 = B_1@5284b8f9
In practice, this situation arises when someone uses a third
party class that was compiled against other libraries not avaialable
on the current compilation classpath.
|
|\ \ \ \
| | | | |
| | | | | |
SI-7292 Fixes test failures by updating *.check files
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
Looks like partest's confusion about / vs. \ was fixed between
the original Jenkins run of the fix for SI-7292 and its merge.
|
|\ \ \ \
| |_|_|/
|/| | | |
SI-7292 Deprecate octal escape literals
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
SI-6899, prohibit dangerous, useless implicit conversions.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Increase eligibility requirements for implicit conversions,
such that T => U is ineligible if
T <: Null <or> AnyRef <: U
This has the salutary effect of allowing us to ditch 16
ridiculous implicits from Predef, since they existed solely
to work around the absence of this restriction.
There was one tiny impact on actual source code (one line
in one file) shown here, necessitated because the literal null
is not eligible to be implicitly converted to A via <:<.
def f[A](implicit ev: Null <:< A): A = null // before
def f[A](implicit ev: Null <:< A): A = ev(null) // after
As impositions go it's on the tame side.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7364 Allow raw types in parent position in Java sources
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
To make this work, this commit simply restricts parent
type argument inference to Scala source files.
The surrounding code has also been refactored to avoid a var.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7151 Emit final in bytecode for final inner classes.
|
| | |_|_|/ /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As we did before a regression in 18efdedfb / SI-5676.
This commit tightens up the condition in which the FINAL
modifier is omitted; it now *only* does this for the module
classes of nested objects.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5022 Retain precise existentials through pattern matching
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
From the dawn of scalac's existentials, the typer widens
existentials pt-s by substituting wildcard types in places
of existential quantifiers.
In this example:
class ForSomeVsUnapply {
def test {
def makeWrap: Wrap = ???
def useRep[e](rep: (e, X[e])) = ()
val rep = makeWrap match {
case Wrap(r) => r
};
useRep(rep) // error
}
}
the type of `r` is the result of typechecking:
Apply(
fun = TypeTree(
tpe = (rep#12037: (e#12038, X#7041[e#12038]) forSome { type e#12038 })
args = Bind(r @ _) :: Nil
}
This descends to type the `Bind` with:
pt = (e#12038, X#7041[e#12038]) forSome { type e#12038 }
`dropExistential` clobbers that type to `Tuple2#1540[?, X#7041[?]]`,
which doesn't express any relationship between the two instances
of the wildcard type. `typedIdent` sort of reverses this with a call
to `makeFullyDefined`, but only ends up with:
pt = (Any#3330, X#7041[_1#12227]) forSome { type _1#12227; type e#12038 }
I suspect that this existential dropping only makes sense outside of
typechecking patterns. In pattern mode, type information flows from the
expected type onwards to the body of the case; we must not lose precision
in the types.
For SIP-18 friendly existentials, one `dropExistential` is invertable with
`makeFullyDefined`, so this hasn't been such a big problem.
The error message improvement conferred by SI-4515 took a hit.
That might be a good example to consider when reviewing this change:
Does it tell us anything interesting about this `dropExistential`
business?
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Merge JUnit support into master
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The WeakHashSetTest was written as unit test but put into partest's
`run` category as we were missing direct unit testing support.
That got fixed so moving the test now.
|
| |\ \ \ \ \ \ |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Add `test.junit` ant target that compiles and runs JUnit tests
found in `test/junit` directory.
Add `scala.tools.nsc.SampleTest` that demonstrates working
testing infrastructure.
|
| | |\ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[backport] SI-7498 ParTrieMap.foreach no longer crashes
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Previously, the `split` method of the `ParTrieMap` iterator threw
an exception when splitting a splitter that iterated over nodes
whose hash codes collide.
This was due to reusing the iterator of the list of colliding keys
rather than creating a new splitter.
This commit changes the `subdivide` method to create a new
iterator using the factory method of the current trie map
iterator rather than returning a `LinearSeqLike` iterator.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add Duration.toCoarsest method
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| |_|/ / / / / / /
|/| | | | | | | | |
SI-7479 Make test/files/run/tailcalls.scala pass on Avian
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit modifies the test and check file to use the new diff filter.
|
| | |_|_|_|/ / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
... so that the different results of the test on Avian
can be specified in the check file.
|
|\ \ \ \ \ \ \ \
| |_|_|_|_|_|_|/
|/| | | | | | | |
Removed sbt build.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Difficult though it may be to accept, it must go. We couldn't keep it
working with active maintenance; after eight months of neglect there is
no chance. Nobody is working on it or using it. The code will remain in
the history if anyone wants it.
One of the most annoying experiences one can have when building a new
project is finding out one has been fiddling with an abandoned build
system which isn't even expected to work. Sometimes I check out a scala
project and there is a build.xml, a pom.xml, and a project directory.
We should not be among those who sow such build confusion.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
SI-6811 Remove scala.annotation.cloneable
|
| | |_|_|_|/ /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6747 Deprecate Range#{numRange,last,terminal}Element{s,}
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
There are already better replacements which expose less surprising behaviour.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
retronym/topic/merge-v2.10.2-RC1-35-ga54d86b-to-master
merge 2.10.x to master
|
|/| | | | | | | |
| | |_|_|_|/ / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
Conflicts:
src/partest/scala/tools/partest/DirectTest.scala
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7505 Test case for pattern matcher + type alias bug
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Progressed along with SI-7214 in acd74cae09.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Test for reading JDK 8 (classfile format 52) class files.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
We had several tests designed to only run if the JDK version was at
least some specified version. This commit refactors that common logic
into DirectTest.
|