summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/Meter.scala21
-rw-r--r--test/files/run/programmatic-main.check27
2 files changed, 34 insertions, 14 deletions
diff --git a/test/files/run/Meter.scala b/test/files/run/Meter.scala
index 0c30ddd41e..5700025880 100644
--- a/test/files/run/Meter.scala
+++ b/test/files/run/Meter.scala
@@ -10,10 +10,29 @@ trait Printable extends Any { def print: Unit = Console.print(this) }
object Test extends App {
+ {
+ val x: Meter = new Meter(1)
+ val a: Object = x.asInstanceOf[Object]
+ val y: Meter = a.asInstanceOf[Meter]
+
+ val u: Double = 1
+ val b: Object = u.asInstanceOf[Object]
+ val v: Double = b.asInstanceOf[Double]
+ }
+
val x = new Meter(1)
+ val y = x
println((x + x) / x)
println((x + x) / 0.5)
println((x < x).toString)
-
+
+ println("x.hashCode: "+x.hashCode)
+ println("x == 1: "+(x == 1))
+ println("x == y: "+(x == y))
+ assert(x.hashCode == (1.0).hashCode)
+
+ val a: Any = x
+ val b: Any = y
+ println("a == b: "+(a == b))
}
diff --git a/test/files/run/programmatic-main.check b/test/files/run/programmatic-main.check
index b5a54f5ea7..9ddd4a6e14 100644
--- a/test/files/run/programmatic-main.check
+++ b/test/files/run/programmatic-main.check
@@ -13,17 +13,18 @@
specialize 11 @specialized-driven class and method specialization
explicitouter 12 this refs to outer pointers, translate patterns
erasure 13 erase types, add interfaces for traits
- lazyvals 14 allocate bitmaps, translate lazy vals into lazified defs
- lambdalift 15 move nested functions to top level
- constructors 16 move field definitions into constructors
- flatten 17 eliminate inner classes
- mixin 18 mixin composition
- cleanup 19 platform-specific cleanups, generate reflective calls
- icode 20 generate portable intermediate code
- inliner 21 optimization: do inlining
-inlineExceptionHandlers 22 optimization: inline exception handlers
- closelim 23 optimization: eliminate uncalled closures
- dce 24 optimization: eliminate dead code
- jvm 25 generate JVM bytecode
- terminal 26 The last phase in the compiler chain
+ posterasure 14 clean up erased inline classes
+ lazyvals 15 allocate bitmaps, translate lazy vals into lazified defs
+ lambdalift 16 move nested functions to top level
+ constructors 17 move field definitions into constructors
+ flatten 18 eliminate inner classes
+ mixin 19 mixin composition
+ cleanup 20 platform-specific cleanups, generate reflective calls
+ icode 21 generate portable intermediate code
+ inliner 22 optimization: do inlining
+inlineExceptionHandlers 23 optimization: inline exception handlers
+ closelim 24 optimization: eliminate uncalled closures
+ dce 25 optimization: eliminate dead code
+ jvm 26 generate JVM bytecode
+ terminal 27 The last phase in the compiler chain