| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Instrumentation is (currently) not supported on Avian.
This causes
- tests instrumented/InstrumentationTest.scala and
- instrumented/inline-in-constructors
to fail.
Let's skip these tests on Avian.
|
|\
| |
| | |
undeprecates c.parse
|
|/
|
|
|
|
|
|
|
| |
We never thought that c.parse is going to be completely subsumed by
quasiquotes, but hoped that the use cases that are going to be lost
aren’t going to be noticed by anyone.
Unfortunately, this isn’t the case, so I’m undeprecating c.parse until
we get a better story for those for whom quasiquotes are not enough.
|
|\
| |
| | |
Merge #3209 and 2.10.x to master
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The rationale for not keeping units loaded by default is that the more
units are loaded, the slower is background compilation. For instance, in
the Scala IDE for Eclipse (which uses the presentation compiler),
typechecking occurs every time the reconciler kicks-in (~500millis after
you stop typing), hence it is important that units are not kept loaded
unless strictly necessary (for some extra information about this, see
https://www.assembla.com/spaces/scala-ide/tickets/1001388)
While I agree that using a boolean argument (`keepLoaded`) for deciding
if a unit should be loaded isn't a great design, other methods in
`CompilerControl` also have a keepLoaded parameter, so at least we have
some consistency. For the future, I'm thinking we should be able to
remove the `keepLoaded` flag altogether, and change the implementation
of `askLoadedType` to preserve the same units loaded in the presentation
compiler before and after its execution. Basically, if you want a unit
to be kept loaded, you should call `askReload` first, and then
`askLoadedType`. However, to reduce impact, I think the changes carried
by this commit will help us estimate if the solution I just outlined is
viable (because `askLoadeType` won't be keeping units loaded by default,
which wasn't the case with the former implementation).
(While the patch was mostly contributed by @huitseeker, @dotta has edited the
commit message to preserve the comments in the PR
https://github.com/scala/scala/pull/3209)
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
test/files/jvm/scala-concurrent-tck.scala
|
| | |\ \
| | | | |
| | | | | |
SI-6913 Reapplies a lost fix by @viktorklang
|
| | |/ /
| | | |
| | | |
| | | | |
Origin: viktorklang@1bbe854
|
| |\| |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/compiler/scala/tools/nsc/interactive/Global.scala
|
| | |\ \
| | | |/
| | |/| |
askTypeAt returns the same type for full/ targeted typecheck (2.10.x)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Otherwise we can think that `+` in `1 + BigInt(2)` refers
to a method in `Int`.
In general, this protects the IDE from observing results from
"exploratory" typing which is discarded as the compiler backtracks
to another possibility.
This protection subsumes the condition that checked for overloaded
types: presentation/t7458 now passes without this.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We shouldn't observe tree types under silent mode.
The enclosed test is a standalone version of `1 + BigInt(2)`,
a standard example of exploratory typing in Scala. Once we determine
that none of the `+` methods in `Int` accepts (possibly implicitly
coerced `BigInt`), we have to backtrack and look for a view from
`Int => { +(_: BigInt): ? }`.
The next commit will correct the problem.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
targeted type-checked
When asking for targeted typecheck, the located tree may have overloaded types
is the source isn't yet fully typechecked (e.g., a select tree for an
overloaded method). This is problematic as it can lead to unknown 'hovers',
broken hyperlinking that suddenly starts working, unresolved ScalaDoc comments,
and similar, in the Scala IDE.
With this commit we are hardening the contract of `askTypeAt` to return the
same type whether the file was fully type-checked or targeted type-checked.
This is done by preventing the typechecker to stop too early if the `located`
tree has an overloaded type. Furthermore, I'm assuming that if `located.tpe`
is of type `OverloadedType`, by letting the compiler carry-on the typechecking,
the `located.tpe` will eventually be resolved to a non-overloaded type. Said
otherwise, I expect the targeted typechecking will always terminate (if my
reasoning isn't sound, please say so).
The test provided with this commit demonstrates the new behavior (the position
used to execute the test is resolved to the `foo` method's call). In fact,
before this commit, executing the test returned the following:
(x: Int, y: String)Unit <and> (x: String)Unit <and> (x: Int)Unit
Showing that the tree's type is an overloaded type. The ambiguity is fixed by
this commit, and in fact the test's output is now:
(x: Int)Unit
|
| |\| |
|
| | |\
| | | |
| | | | |
teaches toolbox about -Yrangepos
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Unlike in master, in 2.10.x enabling -Yrangepos requires instantiating
Global with mixed in RangePositions trait.
Same story for toolboxes. Just setting Yrangepos is not enough - one
needs to mix in RangePositions into ToolboxGlobal. I didn’t know that
back then, so now I’m fixing the oversight.
The commit is marked as [nomaster], because -Yrangepos doesn’t need
special treatment in master.
|
| | |\ \
| | | |/
| | |/| |
Corrects positions for Dynamic calls
|
|\ \ \ \
| | | | |
| | | | | |
Remove parallel collection views and, with them, Gen*View
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- code that used to be inherited in *View is now inlined
- the `view` methods on `ParIteratoa` and `ParSeq` now
convert to sequential collections, and are deprecated
asking the user to do this explicitly in the future.
Should be largely source compatible with 2.10.x, on the assumption
that the removed classes, while being public, were internal
implementation details.
A few tests used now-removed classes to demonstrate compiler crashes.
I managed to confirm that after my decoupling, t4365 still exercises
the bug:
% qbin/scalac test/files/pos/t4365/*.scala
warning: there were 2 deprecation warning(s); re-run with -deprecation for details
one warning found
% scalac-hash 7b4e450 test/files/pos/t4365/*.scala
warning: there were 2 deprecation warning(s); re-run with -deprecation for details
one warning found
% scalac-hash 7b4e450~1 test/files/pos/t4365/*.scala 2<&1 | grep -i wrong
error: something is wrong: cannot make sense of type application
something is wrong: cannot make sense of type application
something is wrong: cannot make sense of type application
I didn't manage to do the same for specializes-sym-crash.scala,
and instead just made it compile.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In 2.12, this gives us the option to move the code from
Gen*View down into *View. If we don't do something more
drastic with views, which inertia and history suggests
is a real possibility, we can at least shed a little of
the implementation.
These abstractions are *only* used to share implementation;
there is no `view` method available on, for instance, `GenSeq`
that lets one abstract over parallel/sequential collections
while spawning views.
scala> (List(1): collection.GenSeq[Int]).view
<console>:8: error: value view is not a member of scala.collection.GenSeq[Int]
(List(1): collection.GenSeq[Int]).view
^
Let's keep it that way.
I suspect that views over parallel collections exist not because
they were the most sought after feature, but rather because the
initial incarnatin of parallel collections used to live undernead
TraversableOnce, and hence were obligated to implement `def view`.
This change will give us deprecation warnings in the non deprecated
places that extend `Gen*View` (three, by my count) in the interim.
There are ways to avoid this, but they aren't particularly appealing.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use -Dupdate.versions to update versions.properties
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
better error messages for various macro definition errors
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fixes SI-8014, regression in Vector ++ TraversableOnce.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Now uses the cached copy instead of the exhausted iterator. Adds a JUnit
test for ++.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Diminished Tuple Confusion
|
| | |_|_|_|/ / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Firstly, for `((a, b) => c): (Tuple2[A, B] => C)`, we currently
just offer "missing parameter type." Is something of a rite of
passage to know that you need `{ case (...)}`
This commit stops short DWIM, but does offer a diagnostic to guide
the user towards the supported way of destructuring a `Tuple` in
the sole argument of a `Function1`.
Secondly, another (less common?) way one might try to write a function
to destructure a single tuple argument is:
(((a, b)) => c)
The parser now matches offers a specific error message for this, and
points out the alternatives.
In both cases, we avoid offering syntactically invalid alternatives,
by detecting names that aren't valid as variable-patterns, and
falling back to generic "paramN" in the error message.
A handly utility function to sequence a list of options is liberated
from the pattern matcher for broader use.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7373 Make the constructor of Vector non-public
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The danger of:
new Vector(1, 2, 3).toString
java.lang.NullPointerException
and the "should have been private all along" argument
call for a break in the source compatibility policy here.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
SI-8023 Fix symbol-completion-order bug of type var patterns
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Make `WildCardType` kind polymorphic
- Factory methods for expected kinds. They are still just
`Type`-s, though.
- Check if the type parameter is initialized, rather than
its owner.
- Take advantage of these to cleanup `typedAppliedTypeTree`
TODO: is this comment totally accurate? If so, should we
refactor `Kind.FromParams(tparams)` to `Kind.Arity(tparams.length)`?
// @M: kind-arity checking is done here and in adapt,
// full kind-checking is in checkKindBounds (in Infer)
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Removing the `isComplete` check altogether leads to cycles in,
for instatnce, F-bound type parameters:
trait LSO[+A, +Repr <: LSO[A, Repr]] // error: illegal cyclic reference involving type Repr
But, I believe that we can (and must) eagerly initialize the type
parameter symbols if we are typechecking a pattern.
While this appeared to regress in 2.11.x, but the problem was in fact
dormant and was merely uncovered in the fix for SI-7756, 3df1d77fc.
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
SI-8022 Backwards compatibility for Regex#unapplySeq
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The change in ce1bbfe / SI-6406 introduced overloads of
`unapplySeq` with wider static and dynmaic result types
than the now-deprecated alternative that accepted `Any`.
This is subtly source incompatible and the change was noticed
in Specs2.
This commit uses `List` as the static and runtime type for
the new overloads.
For consistency, the same is done for the new method added
in SI-7737 / 93e9623.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove unused android tests.
|
|/ / / / / / |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
No longer support unreleased STARR.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The STARR ("stable reference") compiler is used to bootstrap the compiler.
It is now always resolved from maven, based on the `starr.version`
property (stored in `versions.properties`).
Before, we used the `.desired.sha1` mechanism to pull a set of jars
that define the compiler used to build locker ("local reference"),
which then builds quick.
From now on, we only support officially released versions of STARR.
Milestones are allowed of course, which means that, instead of
breaking change, STARR evolution must support old and new behavior
for at least one milestone cycle.
For local development, use the `replacestarr` target as before.
It builds quick (core only) and publishes it to your local maven repo
with a generated version number, which is saved as `starr.version`
in `build.properties` for convenience (overriding `versions.properties`),
so that your next build will use this version of the compiler for STARR.
You may now think of STARR as STAble Reference Release -- if you will.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
No functional changes -- in an effort to separate state from behavior.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Merge 2.10.x, and PR #3196, to master
|
| |\ \ \ \ \ \
| | | |_|_|_|/
| | |/| | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
merge/2.10.x-positions-to-master
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
test/files/neg/applydynamic_sip.check
- Changes two calls from `.endOrPoint` to `.point`. The latter
is safe in master for both `Range`- and `OffsetPosition`s
- Updates checkfiles with unrelated position changes (constructors)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously there occurred a NoPosition error when one asks for position
information in the AST because no positions were set to the trees
created during the transformation for updateDynamic calls. This commit
applies range positions to the trees in order to being able to highlight
them inside of the scala-ide.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously, there were no positions created for the tuples that are
generated while doing the transformation for an applyDynamicNamed call.
This led to an NoPosition error in scalac when one tries to show
position information in the AST. Furthermore, this simplifies semantic
highlighting in the scala-ide because no position information for color
ranges have to be created anymore.
|
| | | |_|_|/
| | |/| | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The new positions are range positions that directly refer to the
beginning and the end of the method calls in the sources instead of
simply point to the beginning of the expression. This allows the
scala-ide to semantically highlight select- and applyDynamic method
calls, because it has only to traverse the tree and apply the color
ranges to the given position ranges.
This also fixes the position marker of an error messages related
to a wrong Dynamic method signature.
|
| |\| | | |
| | |_|/ /
| |/| | |
| | | | | |
merge/2.10.x-positions-to-master
|
| | |\ \ \
| | | | | |
| | | | | | |
Backport of
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Updates localeContext() to return the best context possible when there are none directly
associated with the given position. It happens when an expression cannot be
successfully typed, as no precise ContextTree covers the expression location, or if the
position is not inside any expression.
Adds corresponding tests
(cherry picked from commit 3028327e2a2b553b12ee45519413515c8aa0865f)
|