author | Christian Urban <christian.urban@kcl.ac.uk> |
Tue, 22 Mar 2022 11:14:02 +0000 | |
changeset 462 | d9b672c4c0ac |
parent 44 | a751aa1ee4f7 |
permissions | -rw-r--r-- |
44 | 1 |
package Main |
2 |
||
3 |
object ClassReprTest { |
|
4 |
abstract class Bar { |
|
5 |
type T <: AnyRef |
|
6 |
def bar(x: T) { |
|
7 |
println("5: " + x.getClass()) |
|
8 |
} |
|
9 |
} |
|
10 |
def main(args: Array[String]) { |
|
11 |
println("1: " + args.getClass()) |
|
12 |
println("2: " + classOf[Array[String]]) |
|
13 |
||
14 |
new Bar { |
|
15 |
type T = Array[String] |
|
16 |
val x: T = args |
|
17 |
println("3: " + x.getClass()) |
|
18 |
println("4: " + classOf[T]) |
|
19 |
}.bar(args) |
|
20 |
} |
|
21 |
} |