| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'ac432bcde6':
Fix broken build.
SI-6434 Pretty print function types with by name arg as (=> A) => B
Removed class files.
SI-6994 Avoid spurious promiscuous catch warning
Addressing warnings.
SI-6439 Avoid spurious REPL warnings about companionship
use ArrayBuffer instead of Array to build Formulae
SI-6942 more efficient unreachability analysis
use Constant::isIntRange even if it's NIH
SI-6956 determine switchability by type, not tree
SI-5568 Comment improvements for getClass on primitive intersection.
SI-5568 Fixes verify error from getClass on refinement of value type
SI-6923 Context now buffers warnings as well as errors
Conflicts:
src/compiler/scala/tools/nsc/interpreter/IMain.scala
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/compiler/scala/tools/nsc/typechecker/Contexts.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
test/files/neg/t4851.check
Note:
This merge excludes b07228aebe7a as it breaks master.
|
| |\
| | |
| | | |
SI-6439 Avoid spurious REPL warnings about companionship
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`val m` isn't a companion of `trait m`, check the pair of
eponymous symbols are a ((class|trait), object) pair before
emitting the warning.
In order to correctly check this one a type alias is involved,
`definedSymbols` must avoid normalizing through type aliases.
AFAICT this is an improvement to the other clients of that Map,
one such power mode progression is demonstrated at the end
of the test case.
|
| |\ \
| | | |
| | | | |
Addressing warnings.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
- SI-6923 uncovered a few valid warnings, these have been
addressed.
- A pair of "catches all throwable" warnings appeared; one
of the is spurious and the subject of SI-6994.
|
| |\ \
| | | |
| | | | |
SI-6994 Avoid spurious promiscuous catch warning
|
| | |/
| | |
| | |
| | |
| | | |
It was being issued upon re-typechecking of a transformed
tree. Now we disable the warning post-typer.
|
| |\ \
| | | |
| | | | |
Fix broken build.
|
| |/ /
| | |
| | |
| | | |
It's all system admin, all the time, here at scala ranch.
|
| |\ \
| | | |
| | | | |
SI-6434 Pretty print function types with by name arg as (=> A) => B
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were pretty printing a function type with one by name arg as
=> A => B, but because => is right associative that's formally
equivalent to => (A => B) and that's entirely a different thing. This
commit changes the pretty printer in Typers.scala to check for a
byname argument on a function type and wrap it in parens. A REPL test
is included.
|
| |\ \
| | | |
| | | | |
Removed class files.
|
| |/ /
| | |
| | |
| | | |
Someone checked in a pair of .class files.
|
| |\ \
| | |/
| |/| |
SI-6942 more efficient CNF conversion in patmat analysis
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Avoid blowing the stack/the analysis budget by more eagerly translating
the propositions that model matches to CNF.
First building a large proposition that represents the match,
and then converting to CNF tends to blow the stack.
Luckily, it's easy to convert to CNF as we go.
The optimization relies on `CNF(P1 /\ ... /\ PN) == CNF(P1) ++ CNF(...) ++ CNF(PN)`:
Normalizing a conjunction of propositions
yields the same formula as
concatenating the normalized conjuncts.
CNF conversion is expensive for large propositions,
so we push it down into the conjunction and
then concatenate the resulting arrays of clauses (which is cheap).
(CNF converts a free-form proposition into an `Array[Set[Lit]]`, where:
- the Array's elements are /\'ed together;
- and the Set's elements are \/'ed;
- a Lit is a possibly negated variable.)
NOTE:
- removeVarEq may throw an AnalysisBudget.Exception
- also reworked the interface used to build formula,
so that we can more easily plug in SAT4J when the time comes
|
| |\ \
| | |/
| |/| |
SI-5568 Fixes verify error from getClass on refinement of value type
|
| | |
| | |
| | |
| | |
| | | |
Based on code review here are a few comment cleanups and the removal of
some dead test code.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
().asInstanceOf[AnyRef with Unit].getClass and
5.asInstanceOf[AnyRef with Int].getClass would cause a verify
error. Going the other way, i.e. [Unit with AnyRef] or [Int with AnyRef]
worked fine. This commit fixes it that both directions work out to
BoxedUnit or java.lang.Integer.
|
| |\ \
| | | |
| | | | |
SI-6601 Publicise derived value contstructor after pickler
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Otherwise the access restrictions are not enforced under
separate compilation.
See also SI-6608.
|
| |\ \ \
| | | | |
| | | | | |
SI-6923 Context now buffers warnings as well as errors
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Code that was silently typed would not report warnings, even if it
returned a successful result.
This appeared in the following code which didn't show warnings even
with -Ywarn-adapted-args:
def foo(a: Any) = a; foo(1, 2)
While the following would show the expected warning:
def foo[A](a: Any) = a; foo(1, 2)
|
| |\ \ \
| | | | |
| | | | | |
SI-6956 determine switchability by type, not tree
|
| | | | | |
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Constant folding will set the type of a constant tree
to `ConstantType(Constant(folded))`, while the tree
itself can be many different things (in casu, an Ident).
We used to look at the tree directly when deciding whether
to emit a switch. Now we look at the tree's type. VoilĂ .
|
|\ \ \ \
| | | | |
| | | | | |
Revert "SI-5824 Fix crashes in reify with _*"
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 0a25ee3431d0314c782dd2e6620bc75c4de0d1a4.
It came with a test failure which I overlooked.
|
|\ \ \ \
| | | | |
| | | | | |
SI-5824 Fix crashes in reify with _*
|
| | | | |
| | | | |
| | | | |
| | | | | |
Reification crashes if "foo: _*" construct is used. This happens besause type tree is represented either with TypeTree, or with Ident (present case), and `toPreTyperTypedOrAnnotated' only matches of the former. The fix is to cover the latter too. A test is included.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Small terminology change aimed at improving inclusion.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Small terminology change aimed at improving inclusion.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
align partest script with ant
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
don't silently pass -deprecation to scalac by default
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fix some typos
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes mostly "a int", "a a thing" kind of typos.
Also removes trailing whitespaces, useless empty lines and commented
println() from "test/files/run/ctries-new/iterator.scala".
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Modifies "maybeRewrap" to focus more on the maybe.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Existential types are rewrapped under a bunch of conditions
unless the operation performed on the underlying type returns
the same type by reference equality. That depends on a
foundation of predictability which doesn't exist. The upshot is
that existential types were rewrapped with abandon, even when
the type were identical.
This had both performance and correctness implications.
Note where the test case output changes like so:
-scala.collection.immutable.List[Any]
+scala.collection.immutable.List[<?>]
That's correctness.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-6811 Move scala.util.{automata,regexp} ...
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
... to scala.xml.dtd.impl and make it private[dtd]
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
SI-6811 Scheduled removal of deprecated items for 2.11
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|