You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In bytecode, vararg parameters are encoded as arrays with the
ACC_VARARGS flag set on the method. Previously we first parsed them as
arrays then translated the array into a repeated param. With this commit
we directly parse them as array, this isn't really any simpler since we
need to keep track of the fact that we're in a varargs method, but it
will become useful in the next commit where we start treating arrays
differently from varargs (`T[]` will still be translated as `Array[T &
Object]` whereas `T...` will be translated as `T*` and handled specially
in ElimRepeated to preserve soundness).
Similarly for joint compilation, we now directly desugar varargs as
`RepeatedParam[T]` instead of `Array[T] @Repeated`, this doesn't change
anything currently because:
- When giving a type to the method, we call `annotatedToRepeated` on
each parameter type
- `typedAppliedTypeTree` takes care of adding `& Object` for both
`Array[T]` and `RepeatedParam[T]` coming From Java (this is what
the next commit will change).
0 commit comments