This file contains hidden or 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
typing off; | |
order normal; | |
true = lambda x.lambda y.x; | |
false = lambda x.lambda y.y; | |
if = lambda b.lambda t.lambda f.b t f; | |
not = lambda b.b false true; | |
and = lambda b1.lambda b2.b1 b2 false; | |
or = lambda b1.lambda b2.b1 true b2; |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
This file contains hidden or 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
object unsoundMini { | |
trait A { type L >: Any} | |
def upcast(a: A, x: Any): a.L = x | |
val p: A { type L <: Nothing } = null | |
def coerce(x: Any): Nothing = upcast(p, x) | |
coerce("Uh oh!") | |
} |
NewerOlder