Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to implement Java interface, like javafx.scene.control.Skinnable #8231

Closed
scabug opened this issue Feb 3, 2014 · 2 comments
Closed

Comments

@scabug
Copy link

scabug commented Feb 3, 2014

The following code compiles with 2.10.3 but fails with 2.11.0-M8:

  val skinnable = new javafx.scene.control.Skinnable {
    def skinProperty = null
    def getSkin = null
    def setSkin(s: javafx.scene.control.Skin[_]) {}
  }

fails with error message:

[error] ...: object creation impossible, since method setSkin in trait Skinnable of type (x$1: javafx.scene.control.Skin
[_])Unit is not defined
[error] (Note that javafx.scene.control.Skin[_] does not match javafx.scene.control.Skin[_ <: javafx.scene.control.Skinnable]: their type parameters differ)
[error]   val skinnable = new javafx.scene.control.Skinnable {
[error]                       ^

In Java "setSkin" is defines as:

void setSkin(Skin<?> value)

see http://docs.oracle.com/javafx/2/api/javafx/scene/control/Skinnable.html

This is a critical bug since there is no workaround, that I can see.

A sample SBT project is attached (you need to define variable JAVA_HOME pointing to Java 1.7 SDK installation).

@scabug
Copy link
Author

scabug commented Feb 3, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8231?orig=1
Reporter: Jarek Sacha (jpsacha)
Affected Versions: 2.11.0-M8
Attachments:

@scabug
Copy link
Author

scabug commented Feb 4, 2014

@adriaanm said:
I confirmed my fix for #6169 fixes this one. Closing as duplicate -- thanks for the small reproduction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants