Created
October 26, 2017 14:03
-
-
Save fkowal/33369c5315d6bb2b14caf2bb6387b888 to your computer and use it in GitHub Desktop.
scala 2.12.4 access java inner abstract class protected method problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy val root = (project in file(".")). | |
settings( | |
crossScalaVersions := Seq("2.12.3", "2.12.4"), | |
inThisBuild(List( | |
organization := "com.example", | |
scalaVersion := "2.12.3", | |
version := "0.1.0-SNAPSHOT" | |
)), | |
name := "Hello" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
public interface Converter { | |
abstract class FactoryFactory { | |
protected static String getString() { // the problem is with accessing this method | |
return "string"; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
import com.example.Converter | |
import com.example.Converter.FactoryFactory | |
class FactoryImpl extends Converter.FactoryFactory { | |
import FactoryFactory.getString | |
def method(): Unit = { | |
val s = getString() // getting -> not found: value getString in scala 2.12.4 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
after bumping the scala version 2.12.3 to 2.12.4
i encountered this problem with my scala implementation of https://github.com/square/retrofit/blob/master/retrofit/src/main/java/retrofit2/Converter.java
access to getParameterUpperBound, getRawType stopped working