Hi, I think you’d have better luck cc/ing this to the entire scala-on-android mailing list (done!), rather than a single person.
Nick On Tuesday, September 16, 2014 9:57:00 PM UTC+1, Lukas Rytz wrote: > > cc / Josh Gao (submitted the PR <https://github.com/scala/scala/pull/3964>), > Sung-Ho Lee (scaloid <https://github.com/pocorall/scaloid> maintainer) > > > Hi, > > I'm looking into the Scala compiler's support for adding a static > "CREATOR" field to classes extending Parcelable > <http://developer.android.com/reference/android/os/Parcelable.html>. > > I have doubts that what the Scala compiler does is working in any way - or > can you show me any working examples? > > > For example, if I write: > > class C extends android.os.Parcelable { > def foo = 0 > } > > Then the Scala compiler (2.11.2) produces (pseudo-syntax): > > class C extends android.os.Parcelable { > static final Parcelable$Creator CREATOR = C$.MODULE$.CREATOR() > // - the initializer expression is added to the static class initializer > of C > // - the intialization does an "invokevirtual" of a method called > "CREATOR" - I haven't found such a method anywhere (Android API?) > // Is it expected to be provided by the user? Then the compiler should > warn if it's not there! > // - no class file named C$ is emitted - class loading fails with > "ClassNotFoundException: C$" > } > > > I'd be glad if somebody can shed some light on this. I found some more > bugs in there. > > Thanks! > Lukas > -- You received this message because you are subscribed to the Google Groups "scala-on-android" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
