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
+8 -8
View File
@@ -1,5 +1,5 @@
fun Int?.optint() : Unit
val Int?.optval : Unit
fun Int?.optint() : Unit {}
val Int?.optval : Unit = ()
fun <T, E> T.foo(x : E, y : A) : T {
y.plus(1)
@@ -33,21 +33,21 @@ fun test() {
val Int.abs : Int
get() = if (this > 0) this else -this;
val <T> T.foo : T
val <T> T.<error>foo</error> : T
fun Int.foo() = this
namespace null_safety {
fun parse(cmd: String): Command? { return null }
class Command() {
abstract class Command() {
// fun equals(other : Any?) : Boolean
val foo : Int
abstract val foo : Int
}
fun Any.equals(other : Any?) : Boolean
fun Any?.equals1(other : Any?) : Boolean
fun Any.equals2(other : Any?) : Boolean
fun Any.equals(other : Any?) : Boolean = true
fun Any?.equals1(other : Any?) : Boolean = true
fun Any.equals2(other : Any?) : Boolean = true
fun main(args: Array<String>) {