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

Cannot extend JavaFX class LineChart #11588

Closed
TeXSatz opened this issue Jun 25, 2019 · 1 comment

Comments

@TeXSatz
Copy link

commented Jun 25, 2019

Probably similar: #11584
Probably related: #7631

Compiling with 2.12.8 works, and runs well.
Switching to 2.13.0 breaks the compile:

import javafx.scene.chart.{LineChart, NumberAxis}

class MyLineChart(val xAxis: NumberAxis, val yAxis: NumberAxis)
  extends LineChart[Number, Number](xAxis, yAxis) {
    // ...
}
[error] ...\src\main\scala\MyLineChart.scala:3:7: name clash between inherited members:
[error] private[package chart] def dataBeingRemovedIsAdded(x$1: javafx.scene.chart.XYChart.Data[Number,Number], x$2: javafx.scene.chart.XYChart.Series[Number,Number]): Unit in class XYChart and
[error] private[package chart] def dataBeingRemovedIsAdded(x$1: javafx.scene.chart.XYChart.Data, x$2: javafx.scene.chart.XYChart.Series): Unit in class LineChart
[error] have same type after erasure: (x$1: javafx.scene.chart.XYChart.Data, x$2: javafx.scene.chart.XYChart.Series)Unit
[error] class MyLineChart(val xAxis: NumberAxis, val yAxis: NumberAxis)
[error]       ^
[error] one error found

Using JavaFX 11.0.2 or 12.0.1 with Java 11.0.2.
See also: https://users.scala-lang.org/t/scala-2-13-0-vs-javafx-11-extending-linechart-produces-new-error/4678
This prevents my adoption of 2.13.0 for several projects.

@hrhino

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

I'm going to guess this is also #11584, seeing how the error message mentions XYChart.Data without type arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.