JET-50 Drop the 'new' keyword
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
== foo ==
|
||||
fun foo() {
|
||||
val a = new Array<Int>
|
||||
val a = Array<Int>
|
||||
3
|
||||
a[10] = 4
|
||||
2
|
||||
@@ -11,7 +11,8 @@ fun foo() {
|
||||
---------------------
|
||||
l0:
|
||||
<START>
|
||||
r(new Array<Int>)
|
||||
r(Array)
|
||||
r(Array<Int>)
|
||||
w(a)
|
||||
r(3)
|
||||
r(4)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun foo() {
|
||||
val a = new Array<Int>
|
||||
val a = Array<Int>
|
||||
3
|
||||
a[10] = 4
|
||||
2
|
||||
|
||||
@@ -9,7 +9,7 @@ fun assignments() : Unit {
|
||||
val y = true && false
|
||||
val z = false && true
|
||||
|
||||
val t = new Test();
|
||||
val t = Test();
|
||||
t.x = 1
|
||||
}
|
||||
---------------------
|
||||
@@ -43,7 +43,8 @@ l4:
|
||||
l5:
|
||||
r(false && true)
|
||||
w(z)
|
||||
r(new Test())
|
||||
r(Test)
|
||||
r(Test())
|
||||
w(t)
|
||||
r(1)
|
||||
r(t)
|
||||
|
||||
@@ -12,6 +12,6 @@ fun assignments() : Unit {
|
||||
val y = true && false
|
||||
val z = false && true
|
||||
|
||||
val t = new Test();
|
||||
val t = Test();
|
||||
t.x = 1
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
== fail ==
|
||||
fun fail() : Nothing {
|
||||
throw new java.lang.RuntimeException()
|
||||
throw java.lang.RuntimeException()
|
||||
}
|
||||
---------------------
|
||||
l0:
|
||||
<START>
|
||||
r(new java.lang.RuntimeException())
|
||||
r(java)
|
||||
r(lang)
|
||||
r(java.lang)
|
||||
r(RuntimeException)
|
||||
r(RuntimeException())
|
||||
r(java.lang.RuntimeException())
|
||||
jmp(error)
|
||||
l1:
|
||||
<END>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun fail() : Nothing {
|
||||
throw new java.lang.RuntimeException()
|
||||
throw java.lang.RuntimeException()
|
||||
}
|
||||
Reference in New Issue
Block a user