diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-07-05 14:22:00 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-08-11 11:36:51 +0200 |
commit | 0d2760dce189cdcb363e54868381175af4b2646f (patch) | |
tree | dc4aa2565c62189f25d9d89e07262f16718e9c7f /test/files/pos/t8363.scala | |
parent | 6612ba010b0e70c53550d1e47141c8dc89a55f23 (diff) | |
download | scala-0d2760dce189cdcb363e54868381175af4b2646f.tar.gz scala-0d2760dce189cdcb363e54868381175af4b2646f.tar.bz2 scala-0d2760dce189cdcb363e54868381175af4b2646f.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
gnerate 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 cleanes 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.
Diffstat (limited to 'test/files/pos/t8363.scala')
0 files changed, 0 insertions, 0 deletions