| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pickling of trees within annotation arguments led to an unfortunate
situation: the MethodType of a symbol contained a value parameter
symbol that was pickled as though it were owned by the enclosing
class (the root symbol of the pickle.)
Under separate compilation, this would appear as a member of that
class.
Anyone using `@deprecatedName('oldName)` was exposed to this problem,
as the argument expands to `Symbol.apply("oldName")`.
This commit extends some similar treatment of local type parameters
to also consider value parameters.
|
|\
| |
| | |
SI-7704 Fix partest's test category selection (again)
|
|/
|
|
|
| |
Looks like multiple, different fixes for this issue managed to break it
again.
|
|\
| |
| | |
kills introduceTopLevel
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As we've figured out from the practice, introduceTopLevel is seductively
useful but unfortunately not robust, potentially bringing compilation
order problems.
Therefore, as discussed, I'm removing it from the public macro API.
Alternatives are either: 1) delving into internals, or
2) using macro paradise and experimenting with macro annotations:
http://docs.scala-lang.org/overviews/macros/annotations.html.
|
|\ \
| | |
| | | |
SI-6507 do not call .toString on REPL results when :silent is on.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Member handlers used to always call .toString on REPL results, even when
:silent was on, which could force evaluation or cause unwanted side
effects.
This forwards the current value of `printResults` to the member
handlers (through Request) for them to decide what to do when the
results must not be printed.
2 handlers now do not return any extraction code when silent:
- ValHandler, so that it doesn't call toString on the val
- Assign, so that it doesn't call toString on the right-hand side
of the assignement.
|
|\ \ \
| | | |
| | | | |
SI-7630 [Avian] Skip test run/repl-javap-outdir-funs on Avian
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
The test fails, because the REPL command reports that no anonfuns were
found. I have spent a considerable amount of time to figure out what's
the issue here with no success.
Skip it for now, so that we don't lose sight of the big picture.
|
|\ \ \
| | | |
| | | | |
SI-7564 [Avian] Whitespace fixes to run/tailcalls.check
|
| | |/
| |/|
| | |
| | |
| | | |
Looks like the differences in the whitespace caused the test to fail
on Avian.
|
|\ \ \
| | | |
| | | | |
SI-7681 Remove DaemonThreadFactory, clean up IMain
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
updated SI-7331, SI-6843, SI-7731, parser entry point refactoring, assertThrows utility function
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1. don't recreate symbol table manually and just let JUnit do it
automatically behind the scenes
2. minor changes to assertThrow's description
3. add one more test case to check that exception's subclasses
are catched too
4. refine rethrow test to ensure that the exception wasn't swallowed
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is achieved in a following way:
1. Similarly to toolbox quasiquotes can go away with wrapping for
parsing purpose after introduction of `parseStats` and `parseRule`
entry points.
2. In case of syntax error quasiquote computes equivalent corresponding
position in the source code with the help of `corrrespondingPosition`
mapper which relies on position data collected into `posMap` during
code generation.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change toolbox parsing to use `parseStats` parser entry point
instead of current code-wrappign technique that makes positions
much less useful to end users.
There is also no need to create a compiler `Run` for parsing.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit refactors repl to use `parseStats` entry point and
streamlines hacky error handling that was previously used to
encode errors that happen during parsing.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit contains three logical changes:
1. Split `templateStatSeq` into two methods as we need more reliable
parsing of template body alone for new `parseStats` entry point.
2. Add new parser entry point called `parseStats` which is aimed towards
use in tools that require parsing of Scala code that can be written
inside of a template.
Such functionality is required for parsing lines in repl, parsing
code through toolbox, parsing and running scala scripts and lastly
for quasiquotes. All of them are refactored to use this very method
in the next commits.
A new method called `templateStatsCompat` is also added to make this
commit pass the tests but it's a temporary hack that will be removed
in next commit in favor of `parseStats`.
3. Extract out a few methods like `isCaseDefStart`, `expectedMsgTemplate`
and `parseRule`. These are needed to override parser behaviour in
updated quasiquotes parser (see next commits).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously setPos, pos_=, setType, tpe_= all behaved inconsistently
between each other even though they all represent similar
attributes that cannot be changed on CannotHaveAttrs trees.
In order to simplify handling of such trees in compiler code each
of these fields now supports assignment to its current default
value: NoType for tpe and NoPosition for pos. Such assignments
don't mutate underlying trees.
|
| |/ /
| | |
| | |
| | | |
This is much easier to use than built-in JUnit method-level checks.
|
|\ \ \
| | | |
| | | | |
SI-7715 String inpatternation s"$_" for s"${_}"
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In a pattern,
```
scala> implicit class RX(val sc: StringContext) {
| def rx = sc.parts.mkString("(.+)").r }
defined class RX
scala> "2 by 4" match { case rx"$a by $_" => a }
res0: String = 2
scala> val rx"$_ by $b" = "2 by 4"
b: String = 4
```
|
|\ \ \ \
| | | | |
| | | | | |
SI-7470 implements fundep materialization
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This fix provides implicit macros with an ability to affect type inference
in a more or less sane manner. That's crucial for materialization of
multi-parametric type class instances (e.g. Iso's from shapeless).
Details of the technique can be found in comments.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7658 Prevent StackOverflowError in ScalaRunTime.stringOf
|
| | | | | | |
|
| | |/ / /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7704 Fix partest's test category selection
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
... not Unit now.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
My recent changes to command line parsing in 6090709 broke partest's
functionality of picking test categories (e. g. --pos or --run).
The breakage was caused because scala.tools.cmd._ stored the command
line options with the `--` prefix, but TestKinds.standardKinds did not.
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
SI-7544 Interpolation message for %% literal
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since interpolator args are of type Any, it's easy
to write s(args) instead of s(args: _*). I wonder
if Xlint would have warned me about that.
|
| | | | | | |
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The new error text: "conversions must follow a splice; use %% for
literal %, %n for newline".
The error is emitted when % is not at the start of a part; only
the non-conversions %% and %n are allowed.
It would be nice if it were convenient to parse the part to see
what the user may have intended, but c'est l'erreur.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7624 Fix -feature and some -Xlint warnings
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
... and move scalap.scala.tools.scalap.scalax.rules to
scalap.scala.tools.scalap.rules now that all the Monad/Functor/
Applicatve/... stuff has been removed.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
in various places. This includes actors, compiler (mostly some new
macro parts) continuations, partest, scaladoc, scalap.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The changes are actually pretty small:
scala.language.implicitConversions is moved around so that it is only
emitted to the source file if there is an actual implicit conversion.
The rest of the diff are mostly the new generated source files
reflecting that change.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The files are not regenerated here, because additional fixes will
follow in the next commit.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I added a language.existential import to LazyCombiner.scala which
should not be necessary, but causes a spurious warning otherwise:
scala/src/library/scala/collection/parallel/mutable/LazyCombiner.scala:33:
warning: the existential type
scala.collection.parallel.mutable.LazyCombiner[_$1,_$2,_$3] forSome {
type _$1; type _$2; type _$3 <: scala.collection.generic.Growable[_$1] with scala.collection.generic.Sizing },
which cannot be expressed by wildcards, should be enabled by making the implicit value scala.language.existentials visible.
if (other.isInstanceOf[LazyCombiner[_, _, _]]) {
^
I created ticket SI-7750 to track this issue.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Bug fix ! , if $color_opts is unset partest script does not work.
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7737 Regex matches Char
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Enables Char extraction by regex.
```
val r = """(\p{Lower})""".r
"cat"(0) match { case r(x) => true }
val nc = """\p{Lower}""".r
"cat"(0) match { case nc() => true }
```
|