This ensures that typechecking custom unapplications in silent mode
doesn't leak uncatchable errors. Interestingly enough, the problem
only manifested itself for custom unapply methods, not for synthetic
ones generated for case classes.
SI-8844 Fix regression with existentials + type aliases

Regressed in 2a1b15e / SI-8283. Another specimen of an archetypal
bug: unwanted dealising by using `typeSymbol`, rather than
`typeSymbolDirect`.
spec: use the yaml title as the HTML title
Merge pull request #3980 from retronym/ticket/8844

SI-8844 Fix regression with existentials + type aliases
spec: add syntax highlighting for scala code with highlight.js

This adds syntax highlighting for all code scala blocks. Highlighting is
done after MathJax is done rendering so that latex can be used in code
blocks (and it currently *is* used).

Sadly Scala isn't common enough to be bundled in the highlight.min.js
available from CDNs, so we commit a local version of version 8.2 with
only scala bundled in it. The only other language used (ebnf) isn't
supported by highlight.js.
spec: fix latex formatting all over the place

Two things worth mentioning:

 - `\em` and `emph` are not supported by MathJax,
 - and things like `\mathcal{C}_0` require escaping the `_`,
   otherwise markdown sees it as the beginning of  `_some string_`.
   It doesn't happen without the closing bracket in front, e.g. in `b_0`.
spec: remove trailing whitespace everywhere
spec: fix broken links and anchors, including examples

For examples, the "name" of the example (like "Example Ordered") is only
used to derived its html id so that one can link to it (see
`layouts/default.yml`). Ideally all examples should have a name; here I
only added enough to satisfy existing links.
SI-8459 fix incorrect positions for incomplete selection trees

The mentioned issue is a presentation compiler issue, but its root cause is a bug in the parser which incorrectly assigned positions to incomplete selection trees (i.e. selections that lack an indentifier after dot and have some whitespace instead).

In detail: for such incomplete selection trees, the "point" of the position should be immediately after the dot but instead was at the start of next token after the dot. For range positions, this caused a pathological situation where the "point" was greater than the "end" of the position. This position is later used by the typechecker during resolution of dynamic calls and causes it to crash. Of course, because a syntactically incorrect code is required for the bug to manifest, it only happens in the presentation compiler.
SI-8852 Support joint compilation of Java interfaces w. statics

We had to change the java parser to accomodate this language
change in Java 8.

The enclosed test does not require JDK8 to run, it only tests
JavaParsers.

Here is a transcript of my manual testing using Java 8.

```
% tail test/files/run/8852b/{Interface.java,client.scala}
==> test/files/run/8852b/Interface.java <==
public interface Interface {
  public static int staticMethod() {
  	return 42;
  }
}

==> test/files/run/8852b/client.scala <==
object Test extends App {
  assert(Interface.staticMethod() == 42)
}

// Under separate compilation, statics in interfaces were already working
% rm /tmp/*.class 2> /dev/null; javac -d /tmp test/files/run/8852b/Interface.java && scalac-hash v2.11.2 -classpath /tmp -d /tmp test/files/run/8852b/client.scala && scala-hash v2.11.2 -classpath /tmp -nc Test

// Under joint compilation, statics in interfaces now work.
% rm /tmp/*.class 2> /dev/null; qscalac -d /tmp test/files/run/8852b/{client.scala,Interface.java} && javac -d /tmp test/files/run/8852b/Interface.java && qscala -classpath /tmp -nc Test
```
Merge pull request #3974 from xeno-by/topic/buffer-pattern-expander-errors

This ensures that typechecking custom unapplications in silent mode
Merge pull request #3989 from retronym/ticket/8852

SI-8852 Support joint compilation of Java interfaces w. statics
Merge pull request #3988 from ghik/issue/8459

SI-8459 fix incorrect positions for incomplete selection trees
Merge pull request #3984 from gourlaysama/wip/spec

General formatting improvements in the spec
Particular formatting improvement in the spec

Fixes the titularity of the "Overloading resolution" header
under 6.26.1 "Value conversions" to match "Type instantiation."

Hopefully this makes the link to the actual 6.26.3 overloading
resolution section work without further renaming. (Edit: changed
the minor heading to say "Static overload resolution", which is
sufficiently redundant.)

Possibly that is the oftenest-cited section of the entire document.

At least on Stack Overflow, if not in Proceedings of the ACM.
Merge pull request #3990 from som-snytt/issue/spec-overload-title

Particular formatting improvement in the spec
SI-6502 Remove cp command as unworkable

People expect to change the class path midstream.

Let's disabuse them by removing the broken command.

The internals are deprecated.
SI-6502 Repl reset/replay take settings args

The reset and replay commands take arbitrary command line args.
When settings args are supplied, the compiler is recreated.

For uniformity, the settings command performs only the usual
arg parsing: use -flag:true instead of +flag, and clearing a
setting is promoted to the command line, so that -Xlint: is not
an error but clears the flags.

```
scala> maqicode.Test main null
<console>:8: error: not found: value maqicode
              maqicode.Test main null
              ^

scala> :reset -classpath/a target/scala-2.11/sample_2.11-1.0.jar
Resetting interpreter state.
Forgetting all expression results and named terms: $intp

scala> maqicode.Test main null
Hello, world.

scala> val i = 42
i: Int = 42

scala> s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.

scala> :replay -classpath ""
Replaying: maqicode.Test main null
Hello, world.

Replaying: val i = 42
i: Int = 42

Replaying: s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.

scala> :replay -classpath/a ""
Replaying: maqicode.Test main null
<console>:8: error: not found: value maqicode
              maqicode.Test main null
              ^

Replaying: val i = 42
i: Int = 42

Replaying: s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
```

Clearing a clearable setting:
```
scala> :reset -Xlint:missing-interpolator
Resetting interpreter state.

scala> { val i = 42 ; "$i is the loneliest numbah." }
<console>:8: warning: possible missing interpolator: detected interpolated identifier `$i`
              { val i = 42 ; "$i is the loneliest numbah." }
                             ^
res0: String = $i is the loneliest numbah.

scala> :reset -Xlint:
Resetting interpreter state.
Forgetting this session history:

{ val i = 42 ; "$i is the loneliest numbah." }

scala> { val i = 42 ; "$i is the loneliest numbah." }
res0: String = $i is the loneliest numbah.

```
Make compiler.properties fall back to prefixed

Previously, if we wanted to override the shell.prompt property, we had
to modify compiler.properties in the jar. This change lets us do the
following, instead:

    scala -Dscala.shell.prompt="$(echo -e "\npuffnfresh> ")"

All properties previously loaded from compiler.properties now fall back
to "scala." in the system properties when not found.
spec: generated TOC with linkable headers

This adds a table of contents to the spec, with a way to get the link of a
header on hover (like on GitHub) and a "return to top" small icon at the
end of each section.

Jekyll generates the H1-level table of contents, and then the current
one is expended using jQuery all the way down to H5 titles. Examples and
H6 headers are ignored.

GitHub's (MIT licensed) octicons are used for nice "link" and "up"
icons.