-
-
Save rightfold/1267c845981bbc7d526e to your computer and use it in GitHub Desktop.
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
sub f[T <: Gist, U >: X](o: Option[T], z: U) = | |
g(o, z, T.new()); |
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
function f(o, z, $$typeList) { | |
var T, U; | |
$lasagnascript$assert($lasagnascript$isOfClass(o, Option)); | |
if ($$typeList !== undefined) { | |
T = $$typeList.types[0]; | |
U = $$typeList.types[1]; | |
$lasagnascript$assert($lasagnascript$isOfType(z, U)); | |
} else { | |
T = o.$lasagnascript$types[0]; | |
U = $lasagnascript$typeOf(z); | |
} | |
$lasagnascript$assert($lasagnascript$isSubtype(T, Gist)); | |
$lasagnascript$assert($lasagnascript$isSubtype(X, U)); | |
return g(o, z, $lasagnascript$new(T)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment