Created
August 17, 2015 16:21
-
-
Save oxc/655bc8feb496ac87c336 to your computer and use it in GitHub Desktop.
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
/** | |
* given super-class from a 3rd-party library | |
*/ | |
abstract class AbstractSuperClass<T extends AbstractParamClass> { | |
// ... | |
abstract static class AbstractParamClass { | |
// ... | |
} | |
} |
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
// can I somehow pass MyParam to the super-class while still being | |
// able to access MyType from MyParam, without having to specify | |
// it as MyClass[MyParam]? | |
abstract class MyClass extends AbstractSuperClass[MyParam] { // does not work | |
type MyType | |
class MyParam(val t : MyType) extends AbstractParamClass { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment