diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-07-05 14:22:00 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan@lightbend.com> | 2017-01-09 15:34:26 -0800 |
commit | de361dfe4fab67a01750bccf960788ef10321e4d (patch) | |
tree | 7a53bd46e157055c4f99fca884643d1b41f9a48a /README.md | |
parent | f841dab6c2eb8d9002c286d57ea80df637a0d4bc (diff) | |
download | scala-de361dfe4fab67a01750bccf960788ef10321e4d.tar.gz scala-de361dfe4fab67a01750bccf960788ef10321e4d.tar.bz2 scala-de361dfe4fab67a01750bccf960788ef10321e4d.zip |
SI-8786 fix generic signature for @varargs forwarder methods
When generating a varargs forwarder for
def foo[T](a: T*)
the parameter type of the forwarder needs to be Array[Object]. If we
generate Array[T] in UnCurry, that would be erased to plain Object, and
the method would not be a valid varargs.
Unfortunately, setting the parameter type to Array[Object] lead to
an invalid generic signature - the generic signature should reflect the
real signature.
This change adds an attachment to the parameter symbol in the varargs
forwarder method and special-cases signature generation.
Also cleans up the code to produce the varargs forwarder. For example,
type parameter and parameter symbols in the forwarder's method type were
not clones, but the same symbols from the original method were re-used.
Backported from 0d2760dce189cdcb363e54868381175af4b2646f,
with a small tweak (checkVarargs) to make the test work on Java 6,
as well as later versions.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -134,7 +134,7 @@ codebase and re-compiles too many files, resulting in long build times (check [sbt#1104](https://github.com/sbt/sbt/issues/1104) for progress on that front). In the meantime you can: - Enable "ant mode" in which sbt only re-compiles source files that were modified. - Create a file `local.sbt` containing the line `(incOptions in ThisBuild) := (incOptions in ThisBuild).value.withNameHashing(false).withAntStyle(true)`. + Create a file `local.sbt` containing the line `antStyle := true`. Add an entry `local.sbt` to your `~/.gitignore`. - Use IntelliJ IDEA for incremental compiles (see [IDE Setup](#ide-setup) below) - its incremental compiler is a bit less conservative, but usually correct. |