scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Special case static field generation for Android's Parcelable.CREATOR lacks generic signature #8788

Open scabug opened 10 years ago

scabug commented 10 years ago

The special case for generating the static Parcelable.Creator CREATOR field for Android incorrectly generates a field with no type parameters.

This is an issue because Android's AIDL tool generates Java code such as the following:

Foo _arg0;
if ((0!=data.readInt())) {
    _arg0 = Foo.CREATOR.createFromParcel(data);
}
scabug commented 10 years ago

Imported From: https://issues.scala-lang.org/browse/SI-8788?orig=1 Reporter: Josh Gao (jmgao) Affected Versions: 2.11.2

scabug commented 8 years ago

@szeiger said: Assigning to 2.12.0-M5 because it looks like this would change the generated code in an incompatible way. Where is the PR indicated by the has-pull-request label?

scabug commented 8 years ago

@szeiger said (edited by @SethTisue on Aug 3, 2016 8:27:08 PM UTC): Not a priority for 2.12 because it's unsuitable for Android anyway due to the Java 8 requirement. This could possibly be solved in a more principled way in 2.13 with proper support for generating static elements.

scabug commented 8 years ago

@SethTisue said: see https://github.com/scala/scala/pull/3964