partial support for 'abstract' modifier added

This commit is contained in:
svtk
2011-09-06 13:25:56 +04:00
parent 07b2ab347d
commit fa631503ef
37 changed files with 388 additions and 127 deletions
+7 -7
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,20 +33,20 @@ 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.equals(other : Any?) : Boolean = true
fun Any?.equals1(other : Any?) : Boolean = true
fun main(args: Array<String>) {