Skip to content

Instantly share code, notes, and snippets.

@jonas
Created November 30, 2013 23:27
Show Gist options
  • Save jonas/7725948 to your computer and use it in GitHub Desktop.
Save jonas/7725948 to your computer and use it in GitHub Desktop.
Scalac test case: .../src/main/scala/not_found.scala:19: not found: value x$1
name := "Scala Test Case: not found"
/*
* [error] .../src/main/scala/not_found.scala:19: not found: value x$1
* [error] val name_conflict = c.map(f(_, name_conflict = true))
*/
object not_found {
trait E
trait C
implicit class PimpedC(coll: C) extends Seq[E] {
def iterator: Iterator[E] = ???
def apply(idx: Int): E = ???
def length: Int = ???
}
val c: C = ???
// Compiles: val NOconflict = c.map(f(_, name_conflict = true))
val name_conflict = c.map(f(_, name_conflict = true))
def f(e: E, name_conflict: Boolean): Int = ???
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment