-
-
Save retronym/0440cd94f6b531d0e5a0 to your computer and use it in GitHub Desktop.
Can't shortcut =:= in runtime reflection
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
scala-hash v2.11.5 -nobootcp | |
Welcome to Scala version 2.11.5-20150101-184742-3fafbc204f (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import reflect.runtime.universe._ | |
import reflect.runtime.universe._ | |
scala> showRaw(typeOf[Predef.String], printIds = true) | |
res0: String = TypeRef(SingleType(ThisType(scala#8700), scala.Predef#2197), TypeName("String")#3318, List()) | |
scala> showRaw(typeOf[Predef.String].dealias, printIds = true) | |
res1: String = TypeRef(ThisType(java.lang#9), java.lang.String#707, List()) | |
scala> showRaw(typeOf[java.lang.String], printIds = true) | |
res2: String = TypeRef(ThisType(java.lang#143), java.lang.String#707, List()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment