Skip to content

Instantly share code, notes, and snippets.

View jesperdj's full-sized avatar

Jesper de Jong jesperdj

View GitHub Profile
@retronym
retronym / type-bounds.scala
Created December 16, 2009 11:17
Tour of Scala Type Bounds
class A
class A2 extends A
class B
trait M[X]
//
// Upper Type Bound
//
def upperTypeBound[AA <: A](x: AA): A = x