Skip to content

Instantly share code, notes, and snippets.

@blast-hardcheese
Created October 24, 2016 06:17
Show Gist options
  • Save blast-hardcheese/9a09f817f47389a15d643b6287521451 to your computer and use it in GitHub Desktop.
Save blast-hardcheese/9a09f817f47389a15d643b6287521451 to your computer and use it in GitHub Desktop.
[error] .../App2.scala:9: type mismatch;
[error] found : input.type (with underlying type H#Input)
[error] required: RouteService.this.Holder.Input
[error] def extractFoo(input: H#Input): Foo = Holder.input2Foo(input)
[error] ^
[error] one error found
[error] (core/compile:compileIncremental) Compilation failed
[error] Total time: 0 s, completed Oct 23, 2016 11:15:51 PM
class Foo
sealed trait HolderInterface {
type Input
def input2Foo(resp: Input): Foo
}
class RouteService[H <: HolderInterface](val Holder: H) {
def extractFoo(input: H#Input): Foo = Holder.input2Foo(input)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment