Last active
May 18, 2016 04:13
-
-
Save eungju/c04d6d686dae143fc86e0803a39a523d to your computer and use it in GitHub Desktop.
123 > "123"
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
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help | |
Prelude> let (>) :: Int -> String -> Bool; (>) a b = (compare a (length b)) == GT | |
Prelude> 123 > "123" | |
True | |
Prelude> 1 > "123" | |
False |
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
import org.junit.Test | |
import kotlin.test.assertTrue | |
class TypeTest { | |
operator fun Int.compareTo(other: String): Int { | |
return 1 | |
} | |
@Test | |
fun gt() { | |
assertTrue(123 > "123") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment