Created
May 2, 2017 14:44
-
-
Save aroberts/f4c1ffd2f51b05943bbc54b5cc066f1e to your computer and use it in GitHub Desktop.
Intellij Scala plugin: Failure to infer class type parameters from parameter list when an implicit parameter list is present
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.fuze.perseus.flink | |
class FailingExample[T](s: Concrete[T])(implicit tc: Typeclass[T]) | |
class WorkingExample[T](s: Concrete[T]) | |
trait Typeclass[T] | |
trait Concrete[T] | |
object Concrete { | |
val instance = new Concrete[Int] {} | |
} | |
object Example { | |
// inspecting types with View > Type Info (defaults to Ctrl + Shift + P) | |
// type of `fail` is inferred to be `FailingExample[Nothing]` | |
val fail = new FailingExample(Concrete.instance) | |
// type of `works` is inferred to be `WorkingExample[Int]` | |
val works = new WorkingExample(Concrete.instance) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment