partial support for 'abstract' modifier added

This commit is contained in:
svtk
2011-09-06 14:57:42 +04:00
41 changed files with 354 additions and 113 deletions
@@ -3,10 +3,10 @@
namespace x
val b : Foo
val b : Foo = Foo()
val a1 = b.compareTo(2)
class Foo() {
fun compareTo(other : Byte) : Int
fun compareTo(other : Char) : Int
fun compareTo(other : Byte) : Int = 0
fun compareTo(other : Char) : Int = 0
}
+1 -1
View File
@@ -1,4 +1,4 @@
fun foo1() : fun (Int) : Int
fun foo1() : fun (Int) : Int = { (x: Int) => x }
fun foo() {
val h : fun (Int) : Int = foo1();
@@ -1,4 +1,4 @@
enum class ProtocolState {
abstract enum class ProtocolState {
WAITING {
override fun signal() = ProtocolState.TALKING
}
+1 -1
View File
@@ -1,4 +1,4 @@
enum class ProtocolState {
abstract enum class ProtocolState {
WAITING {
override fun signal() = ProtocolState.TALKING
}
+2 -2
View File
@@ -2,8 +2,8 @@
import java.util.ArrayList
class Item(val room: Object) {
val name : String
abstract class Item(val room: Object) {
abstract val name : String
}
val items: ArrayList<Item> = ArrayList<Item>
@@ -4,13 +4,13 @@ fun box() {
}
open class A {
fun foo()
fun foo() {}
}
open class B : A {
fun foo()
fun foo() {}
}
open class C : B {
fun foo()
fun foo() {}
}
@@ -1,4 +1,4 @@
fun Any.equals(other : Any?) : Boolean
fun Any.equals(other : Any?) : Boolean = true
fun main(args: Array<String>) {