Fahad/CodeSamples/PredefineClassOf.scala
changeset 44 a751aa1ee4f7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Fahad/CodeSamples/PredefineClassOf.scala	Sun Nov 09 19:25:10 2014 +0000
@@ -0,0 +1,21 @@
+package Main
+
+object ClassReprTest {
+  abstract class Bar {
+    type T <: AnyRef
+    def bar(x: T) {
+      println("5: " + x.getClass())
+    }
+  }
+  def main(args: Array[String]) {
+    println("1: " + args.getClass())
+    println("2: " + classOf[Array[String]])
+    
+    new Bar {
+      type T = Array[String]
+      val x: T = args
+      println("3: " + x.getClass())
+      println("4: " + classOf[T])
+    }.bar(args)
+  }
+}
\ No newline at end of file