diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-08-13 15:46:58 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-08-13 15:48:01 +0200 |
commit | bd73af6fab22ffafe1f0de6c87e217a208814508 (patch) | |
tree | 71639dd55c0588173ae30c49bca5d9480f6432e4 /tests/run | |
parent | 9eb55f1bb112030fe783e42c129e02f91c0aaef5 (diff) | |
download | dotty-bd73af6fab22ffafe1f0de6c87e217a208814508.tar.gz dotty-bd73af6fab22ffafe1f0de6c87e217a208814508.tar.bz2 dotty-bd73af6fab22ffafe1f0de6c87e217a208814508.zip |
GetClass: get classSymbol reliably
TermRefs do not have a classSymbol.
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/getclass.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/run/getclass.scala b/tests/run/getclass.scala index 7e6430a53..7a13a61a2 100644 --- a/tests/run/getclass.scala +++ b/tests/run/getclass.scala @@ -8,6 +8,7 @@ object Test { val iCls: Class[Int] = 1.getClass val f1: Function2[Int, Int, Unit] = (a: Int, b: Int) => println(a + b) val f2: Function1[Int, Boolean] = (a: Int) => a % 2 == 0 + val one = 1 println("Value types:") println(().getClass) @@ -15,7 +16,7 @@ object Test { println(1.asInstanceOf[Byte].getClass) println(1.asInstanceOf[Short].getClass) println('a'.getClass) - println(1.getClass) + println(one.getClass) println(1L.getClass) println(1f.getClass) println(1d.getClass) |