Skip to content

Implicitness is not retained in REPL #6200

Closed
@rjolly

Description

@rjolly

trait Ord[T] {
def compare(x: T, y: T): Int
def (x: T) < (y: T) = compare(x, y) < 0
def (x: T) > (y: T) = compare(x, y) > 0
}

implied IntOrd for Ord[Int] {
def compare(x: Int, y: Int) =
if (x < y) -1 else if (x > y) +1 else 0
}

IntOrd

1 |IntOrd
|^^^^^^
|Not found: IntOrd

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions