added support for java.io.Closeable as a standard interface
This commit is contained in:
@@ -2,3 +2,8 @@ package java.io
|
|||||||
|
|
||||||
library
|
library
|
||||||
public class IOException(message: String = "") : Exception() {}
|
public class IOException(message: String = "") : Exception() {}
|
||||||
|
|
||||||
|
library
|
||||||
|
public trait Closeable {
|
||||||
|
public open fun close() : Unit;
|
||||||
|
}
|
||||||
|
|||||||
@@ -248,6 +248,12 @@ var kotlin = {set:function (receiver, key, value) {
|
|||||||
append: throwAbstractFunctionInvocationError("Appendable#append")
|
append: throwAbstractFunctionInvocationError("Appendable#append")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Kotlin.Closeable = Kotlin.$createClass({
|
||||||
|
initialize: function () {
|
||||||
|
},
|
||||||
|
close: throwAbstractFunctionInvocationError("Closeable#close")
|
||||||
|
});
|
||||||
|
|
||||||
Kotlin.parseInt = function (str) {
|
Kotlin.parseInt = function (str) {
|
||||||
return parseInt(str, 10);
|
return parseInt(str, 10);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user