JET-50 Drop the 'new' keyword

This commit is contained in:
Andrey Breslav
2011-06-15 18:00:10 +04:00
parent c9d9001ad8
commit c2fbbff782
103 changed files with 921 additions and 980 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ class Queue<T> : IPushPop<T> {
private var tail : Item<T> = null
override fun push(item : T) {
val i = new Item(item)
val i = Item(item)
if (tail == null) {
head = i
tail = head
@@ -17,7 +17,7 @@ class Queue<T> : IPushPop<T> {
override fun pop() =
if (head == null)
throw new UnderflowException()
throw UnderflowException()
else {
val result = head.data
head = head.next