Skip to content

Instantly share code, notes, and snippets.

@oxc
Created August 17, 2015 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxc/655bc8feb496ac87c336 to your computer and use it in GitHub Desktop.
Save oxc/655bc8feb496ac87c336 to your computer and use it in GitHub Desktop.
/**
* given super-class from a 3rd-party library
*/
abstract class AbstractSuperClass<T extends AbstractParamClass> {
// ...
abstract static class AbstractParamClass {
// ...
}
}
// 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