Update PartialFunction documentation to include the fact that the caller is responsible for checking 'isDefinedAt'
Update PartialFunction documentation to include the fact that the caller is responsible for checking 'isDefinedAt'
SI-8589 Performance improvement for ArrayCharSequence.toString
Revised comment to appeal to lchoran's and som-snytts comments
SI-8703 add support for blocks with just a single expression to quasiquotes

Previously it was impossible to match a block that was constructed as

    Block(Nil, term)

Due to the fact that quasiquotes always flatten those into just term. This is
a correct behaviour for construction (for sake of consistency with parser) but
doing it in deconstruction mode make it impossible to match such blocks which
could have been constructed manually somewhere.

To fix this we just disable block flattening in deconstruction mode.
Interestingly enough this doesn't break existing code due to the fact that
quasiquote's block matcher also matches expressions as single-element blocks.

This allows to match single-element blocks with patterns like q"{ $foo }".
[backport] transformers no longer ignore UnApply.fun

Backports 7122560063 and 4133eb8454 from the 2.11.x branch
Merge pull request #3752 from jeroentervoorde/SI_8589

SI-8589 Performance improvement for ArrayCharSequence.toString
Minor cleanups and comments in GenBCode
Comment summarizing the JVM spec for InnerClass / EnclosingMethod
Remove unnessecary check when computing InnerClass attribute flags

The final flag is computed correctly by javaFlags.
Pattern matching on ClassBType extracts the inernalName
Clean up and document some usages of flags in the backend
Support writing classfile of version 52
Documentation for isModuleClass
som-snytt's update to wording
SI-8610 -Xlint is multichoice option

Make -Xlint a "multichoice" option for purposes of option parsing.

This allows turning on "lint with these warnings" instead of only
"turn off these warnings but enable other lint warnings".

```
$ scalac -Xlint:warn-adapted-args linty.scala  # lint plus a warning
$ scalac -Xlint warn-adapted-args linty.scala  # same
$ scalac -Xlint linty.scala                    # same as now
$ scalac -Xlint -- linty.scala                 # ok, not necessary
$ scalac -Xlint _ -- linty.scala               # another funky underscore
```

This would also enable Xlint options that are not standalone options,
although that is not implemented in this commit.  For example,
`-Xlint:no-missing-interpolator` could be used to disable that
warning. (There is no `-Xoption:flavor=off` syntax.) (`no-` switches
would not be enabled by `_`.)
SI-8616 Error on -deprecation:true,false

This is an error, not a crash.

Alternatively, one could define the multivalued colon case
as equivalent to specifying the option multiple times. That
would be very regular.  But sometimes it's nicer just to error out.
SI-8525 Add -Xlint:-warn-missing-interpolator

Turn off lint warnings with negating prefix, and add a lint-only
warning for the infamously nagging "Did you forget the interpolator?"

That message is made more dignified.

Without `-Xlint:false`, there is no mechanism to turn off
anonymous linters once `-Xlint` is selected.
relaxes attachment-matching rules

It came as a surprise recently, but attachments.contains/get/update/remove
require the class of the payload to match the provided tag exactly, not
taking subclassing into account. This commit fixes the oversight.
prevents some reflection APIs from destroying rangeposes

This commit continues the work started in fcb3932b32.

As we've figured out the hard way, exposing internally maintained trees
(e.g. macro application) to the user is dangerous, because they can mutate
the trees in place using one of the public APIs, potentially corrupting our
internal state.

Therefore, at some point we started duplicating everything that comes from the user
and goes back to the user. This was generally a good idea due to the reason
described above, but there was a problem that we didn't foresee - the problem
of corrupted positions.

It turns out that Tree.duplicate focuses positions in the tree being processed,
turning range positions into offset ones, and that makes it impossible for macro
users to make use of precise position information.

I also went through the calls to Tree.duplicate to see what can be done
to them. In cases when corruptions could happen, I tried to replace duplicate
with duplicateAndKeepPositions.

Some notes:

1) Tree rehashing performed in TreeGen uses duplicates here and there
(e.g. in mkTemplate or in mkFor), which means that if one deconstructs
a macro argument and then constructs it back, some of the positions in
synthetic trees might become inaccurate. That's a general problem with
synthetic trees though, so I don't think it should be addressed here.

2) TypeTree.copyAttrs does duplication of originals, which means that
even duplicateAndKeepPositions will adversely affect positions of certain
publicly accessible parts of type trees. I'm really scared to change this
though, because who knows who can use this invariant.

3) Some methods that can be reached from the public API (Tree.substituteXXX,
c.reifyXXX, c.untypecheck, ...) do duplicate internally, but that shouldn't be
a big problem for us, because nothing is irreversibly corrupted here.
It's the user's choice to call those methods (unlike with TypeTree.copyAttrs)
and, if necessary, they can fixup the positions themselves afterwards.

4) Macro engine internals (macro impl binding creation, exploratory typechecking
in typedMacroBody) use duplicate, but these aren't supposed to be seen by the user,
so this shouldn't be a problem.

5) Certain parser functions, member syntheses and typer desugarings also duplicate,
but in those cases we aren't talking about taking user trees and screwing them up,
but rather about emitting potentially imprecise positions in the first place.
Hence this commit isn't the right place to address these potential issues.