| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'd392d56d6bf8b0ae9072b354e4ec68becd0df679':
SI-4602 Disable unreliable test of fsc path absolutization
Update a checkfile from a recent fix.
SI-7018 Fix memory leak in Attachments.
SI-4733 - fsc no longer creates a single temp directory for all users.
Bumped partest MaxPermSize to 128m.
SI-6891 Fix value class + tailrec crasher.
Ill-scoped reference checking in TreeCheckers
Make value classes TreeCheckers friendly
SI-4602 Make fsc absolutize source file names
SI-6863 Fix verify error in captured var inited from expr with try/catch
SI-6932 Remove Batchable trait plus minor clean-ups
Fix SI-6932 by enabling linearization of callback execution for the internal execution context of Future
SI-6443 Expand test coverage with varargs, by-name.
SI-6443 Widen dependent param types in uncurry
Conflicts:
src/reflect/scala/reflect/internal/Trees.scala
test/partest
|
| |\
| | |
| | | |
SI-6443 Widen dependent param types in uncurry
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bridge building operates on unusual method signatures:
after uncurry, so parameter lists are collapsed; but before
erasure, so dependently typed parameters are still around.
Original:
def foo(a: T)(b: a.type, c: a.U): Unit
During computeBridges:
(a: T, b: a.type, c: a.U)Unit
This signature no longer appears to override the corresponding
one in a superclass, because the types of `b` and `c` are dependent
on method parameters.
The root of the problem is uncurry, which leaves the trees in
a poor state. This commit changes uncurry to remedy this.
An example illustrates it best:
// source
def foo(a: A)(b: a.type): b.type = b
// post uncurry before this patch.
// not well typed code!
def foo(a: A, b: a.type): a.type = {
// post uncurry after this patch
def foo(a: A, b: A): A = {
val b$1 = b.asInstanceOf[a.type]
b$1
}
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
When an implicit conversion causes an apparently constant
argument not to be constant, show the conversion, not the
constant.
|
| | |
| | |
| | |
| | | |
Now there's a position on the synthetic "value" Ident.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* origin/2.10.x:
SI-6969, mishandling of SoftReferences in method cache.
SI-7011 Fix finding constructor type in captured var definitions
SI-6987 Tests fsc verbose output
SI-6987 Fixes fsc compile server verbose output
SI-6231 Report unsupported free var capture by a trait.
SI-6666 Restrict hidden `this` access in self/super calls.
SI-6902 Check unreachability under @unchecked
SI-6976 Fix value class separate compilation crasher.
Closes SI-6952: add correct error positions for Dynamic feature check.
Conflicts:
src/compiler/scala/tools/nsc/CompileServer.scala
src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
|
| |\ \
| | | |
| | | | |
SI-6231 Report unsupported free var capture by a trait.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If a class nested in a trait captures a free variable from
the enclosing scope of the trait, the transformation to
add that variable to the `init` method of the trait
implementation class happens *after* the abstract trait
interface has been extracted. This would lead to a crash
when trying to find the corresponding interface method.
This commit detects this situation and reports an
implementation restriction. The enclosed test case
shows a workaround.
To lift this restriction, LambdaLifter should add the getters
and make sure they end up in the trait interface. Looks like
Martin tried this once:
// LambdaLift.scala
//
// Disabled attempt to to add getters to freeParams
// this does not work yet. Problem is that local symbols need local names
// and references to local symbols need to be transformed into
// method calls to setters.
// def paramGetter(param: Symbol): Tree = {
// val getter = param.newGetter setFlag TRANS_FLAG resetFlag PARAMACCESSOR // mark because we have to add them to interface
// sym.info.decls.enter(getter)
// val rhs = Select(gen.mkAttributedThis(sym), param) setType param.tpe
// DefDef(getter, rhs) setPos tree.pos setType NoType
// }
// val newDefs = if (sym.isTrait) freeParams ::: (ps map paramGetter) else freeParams
|
| |\ \ \
| | | | |
| | | | | |
SI-6666 Restrict hidden `this` access in self/super calls.
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Detect when classes (user authored or compiler generated)
local to a self or super constructor argument would require
premature access to the in-construction instance.
The same restriction applies for classes and objects; for objects,
the premature access would result in a null via MODULE$ field.
A residual error has been lodged as SI-6997.
I'd like to remove calls to `Symbol#outerClass` (which relies on
the flaky flag INCONSTRUCTOR, see my comments in the JIRA issue
for more discussion) from `LambdaLift` and `ExplicitOuter`, and
instead use the stack of active self/super calls to know when to
skip an enclosing class. That will obviate that flag.
|
| |\ \ \
| | | | |
| | | | | |
SI-6902 Check unreachability under @unchecked
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Only exhaustiveness checking should be disabled if the
scrutinee of a match as annotated as `: @unchecked`.
This was the pre-2.10.x behaviour.
This also fixes a variation of the closed ticket,
SI-6011. The exhaustiveness check is needed to
safely fallback from emitting a table switch if
duplicate cases are detected.
|
| |\ \ \
| | | | |
| | | | | |
Closes SI-6952: add correct error positions for Dynamic feature check.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
commit 284bd754fa5dfc8bc626b0c5ebe85d872dd044cb
Author: Jason Zaugg <jzaugg@gmail.com>
Date: Sat Nov 3 16:19:46 2012 +0100
SI-6567 Warning for Option(implicitView(foo))
I've seen the reported problem before in the wild. It seems
worthy of a special warning, so long as we advocate Option.apply
as an alternative to `if (x == null) Some(x) else None`.
It is behind -Xlint at the moment, an option that could do with
some promotion.
(cherry picked from commit 0bcb9e9169146e3f589c6c9f65cc4a5523b78120)
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* 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.
|
| | |_|/
| |/| |
| | | |
| | | | |
Someone checked in a pair of .class files.
|
| |\ \ \
| | | | |
| | | | | |
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-6811 Scheduled removal of deprecated items for 2.11
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| / /
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/compiler/scala/tools/nsc/doc/Settings.scala
src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala
src/compiler/scala/tools/nsc/matching/Patterns.scala
src/compiler/scala/tools/nsc/transform/UnCurry.scala
src/compiler/scala/tools/nsc/typechecker/Infer.scala
src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/settings/MutableSettings.scala
src/reflect/scala/reflect/runtime/Settings.scala
src/swing/scala/swing/SwingActor.scala
src/swing/scala/swing/SwingWorker.scala
test/files/run/t6955.scala
|
| |\ \
| | | |
| | | | |
SI-6963 Deprecates -Xmigration switch
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
-Xmigration is specific to the 2.7 to 2.8 upgrade and is no longer
relevant. There is no plan to maintain it so it will be removed. This
commit deprecates it in anticipation.
|
| |\ \ \
| | | | |
| | | | | |
SI-6675 -Xlint arity enforcement for extractors
|
| | | | |
| | | | |
| | | | |
| | | | | |
This commit should be discarded when merging to master.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Extractor Patterns changed in 2.10.0 to implement
the letter of the spec, which allows a single binding
to capture an entire TupleN. But this can hide arity
mismatches, especially if the case body uses the
bound value as an `Any`.
This change warns when this happens under -Xlint.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-6082 Conditionally expand @ann(x) to @ann(value = x)
|
| | | |/ /
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
... if the annotation has an argument with the name `value`.
Doing so unconditionally obscures error messages.
We still require that arguments to ClassFileAnnotations
are named, other than for this special case.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-5440 Test case for exhaustiveness check
|
| | | |/ /
| | |/| |
| | | | |
| | | | | |
Reported against patmatclassic, working in virtpatmat.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-5340 Change println to log
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
An esoteric implicit search could trigger an "amb prefix ..."
message to standard out. Now the message has been improved
and sent to the logger.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-5189 detect unsoundness when inferring type of match
|
| | | |_|/
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
GADT skolems encode type slack that results from pattern matching on variant type constructors
I thought they would not longer be relevant after cases have been typed,
and since they caused weird issues with the old pattern matcher, I deskolemized in typedCase
however, when we don't have an expected type for the match, we need to keep the skolems around
until the skolemized type makes it out of the match and it becomes the result of type inference for that match
when you do have an expected type, it will propagate to the case-level and the confrontation will thus
already take place when typing individual cases
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Companion objects (and thus also case classes) in package objects caused
an assert about an overloaded symbol when everything was compiled twice.
It's a hairy problem that doesn't fit in 2.10.1. So this fix adds an
implementation restriction. It also has a test to make sure the error
messages are clean and reasonably friendly, and does not catch other
things defined in package objects. The test includes a
commented out test in case somebody thinks they've solved the underlying
problem.
A handful of tests were falling afoul of the new implementation
restriction. I verified that they do in fact fail on second compile so
they aren't false casualties. But they do test real things we'd like
to work once the re-compile issue is fixed. So I added a -X flag to
disable the implementation restriction and made all the tests
accidentally clobbered by the restriction use that flag.
|
| |\ \ \
| | |_|/
| |/| | |
SI-6912 Avoid a typer cycle in overload resolution.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
c800d1fe, and followup commits 1ddc9358 and b10b5821
modified error handling in `Infer#inferExprAlternative`.
After these changes, this method could fail to resolve
the overloaded alternative if:
best != NoSymbol
&& !competing.isEmpty
&& !noAlternatives
&& pt.isErroneous
This commit calls `setError` in that case, which
prevents the cycle in `adapt`.
While I didn't extract a reproduction from the
original code base, I've included a test case that
exhibits the same symptom.
It was actually pretty tough to find an program that
got close to this code path, but luckilly we've been
pretty close to this bug in SI-5553 / 4f99c2e5, and those
test cases formed the basis for this one.
|
| |\ \
| | | |
| | | | |
Backport of SI-6846.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Squashed commit of the following:
commit 55806cc0e6177820c12a35a18b4f2a12dc07bb39
Author: Paul Phillips <paulp@improving.org>
Date: Wed Dec 19 07:32:19 2012 -0800
SI-6846, regression in type constructor inference.
In 658ba1b4e6 some inference was gained and some was lost.
In this commit we regain what was lost and gain even more.
Dealiasing and widening should be fully handled now, as
illustrated by the test case.
(cherry picked from commit dbebcd509e4013ce02655a2687b27d0967b3650e)
commit e6ef58447d0f4ef6de956fcc03ee283bb9028c02
Author: Paul Phillips <paulp@improving.org>
Date: Fri Dec 21 15:11:29 2012 -0800
Cleaning up type alias usage.
I determined that many if not most of the calls to .normalize
have no intent beyond dealiasing the type. In light of this I
went call site to call site knocking on doors and asking why
exactly they were calling any of
.normalize
.widen.normalize
.normalize.widen
and if I didn't like their answers they found themselves
introduced to 'dropAliasesAndSingleTypes', the recursive widener
and dealiaser which I concluded is necessary after all.
Discovered that the object called 'deAlias' actually depends
upon calling 'normalize', not 'dealias'. Decided this was
sufficient cause to rename it to 'normalizeAliases'.
Created dealiasWiden and dealiasWidenChain.
Dropped dropAliasesAndSingleTypes in favor of methods
on Type alongside dealias and widen (Type#dealiasWiden).
These should reduce the number of "hey, the type alias doesn't work" bugs.
(cherry picked from commit 3bf51189f979eb0dd41744ca844fd12dfdaa0dee)
Conflicts:
src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala
commit c1d8803cea1523f458730103386d8e14324a9446
Author: Paul Phillips <paulp@improving.org>
Date: Sat Dec 22 08:13:48 2012 -0800
Shored up a hidden dealiasing dependency.
Like the comment says:
// This way typedNew always returns a dealiased type. This
// used to happen by accident for instantiations without type
// arguments due to ad hoc code in typedTypeConstructor, and
// annotations depended on it (to the extent that they worked,
// which they did not when given a parameterized type alias
// which dealiased to an annotation.) typedTypeConstructor
// dealiases nothing now, but it makes sense for a "new" to
// always be given a dealiased type.
PS:
Simply running the test suite is becoming more difficult all
the time. Running "ant test" includes time consuming activities
of niche interest such as all the osgi tests, but test.suite
manages to miss the continuations tests.
(cherry picked from commit 422f461578ae0547181afe6d2c0c52ea1071d37b)
commit da4748502792b260161baa10939554564c488051
Author: Paul Phillips <paulp@improving.org>
Date: Fri Dec 21 12:39:02 2012 -0800
Fix and simplify typedTypeConstructor.
Investigating the useful output of devWarning (-Xdev people,
it's good for you) led back to this comment:
"normalize to get rid of type aliases"
You may know that this is not all the normalizing does.
Normalizing also turns TypeRefs with unapplied arguments
(type constructors) into PolyTypes. That means that when
typedParentType would call typedTypeConstructor it would
find its parent had morphed into a PolyType. Not that it
noticed; it would blithely continue and unwittingly discard
the type arguments by way of appliedType (which smoothly
logged the incident, thank you appliedType.)
The simplification of typedTypeConstructor:
There was a whole complicated special treatment of AnyRef
here which appears to have become unnecessary. Removed special
treatment and lit a candle for regularity.
Updated lots of tests regarding newly not-so-special AnyRef.
(cherry picked from commit 394cc426c1ff1da53146679b4e2995ece52a133e)
commit 1f3c77bacb2fbb3ba9e4ad0a8a733e0f9263b234
Author: Paul Phillips <paulp@improving.org>
Date: Fri Dec 21 15:06:10 2012 -0800
Removed dead implementation.
Another "attractive nuisance" burning off time until I
realized it was commented out.
(cherry picked from commit ed40f5cbdf35d09b02898e9c0950b9bd34c1f858)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
A bug in typers mishandled varargs. We should get more
aggressive about eliminating all the ad hoc parameter/argument
handling code spread everywhere. For varargs especially:
any code which tries to make an adjustment based on a
repeated parameter is more likely to be wrong than right.
In aggregate these reinventions are a huge source of bugs.
|
|\ \
| | |
| | | |
SI-6375, warn on lost annotation.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Annotations on abstract vals which are not meta-annotated
were silently discarded. Still discarded, only less silently.
I warned on as many "lost annotation" situations as I was
reasonably able to cover without false positives.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GADT skolems encode type slack that results from pattern matching on variant type constructors
I thought they would not longer be relevant after cases have been typed,
and since they caused weird issues with the old pattern matcher, I deskolemized in typedCase
however, when we don't have an expected type for the match, we need to keep the skolems around
until the skolemized type makes it out of the match and it becomes the result of type inference for that match
when you do have an expected type, it will propagate to the case-level and the confrontation will thus
already take place when typing individual cases
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* commit 'refs/pull/1844/head':
macroExpandAll is now triggered by typed
SI-5923 adapt macros when they are deferred
generalizes macroExpand
typedPrimaryConstrBody now returns supercall
more precise errors for macros
parentTypes => typedParentTypes
changes isTermMacro checks to something more universal
fixes printing of AppliedTypeTree
adds Trees.replace(Tree, Tree)
makes macro override error more consistent
refactors handling of macros in repl
SI-5903 extractor macros do work
adds c.macroRole
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Macros.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|