added support for java.io.Closeable as a standard interface

This commit is contained in:
James Strachan
2012-07-24 11:28:19 +01:00
parent b25c27bfed
commit 6fd3cd0bf0
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -2,3 +2,8 @@ package java.io
library
public class IOException(message: String = "") : Exception() {}
library
public trait Closeable {
public open fun close() : Unit;
}
+6
View File
@@ -248,6 +248,12 @@ var kotlin = {set:function (receiver, key, value) {
append: throwAbstractFunctionInvocationError("Appendable#append")
});
Kotlin.Closeable = Kotlin.$createClass({
initialize: function () {
},
close: throwAbstractFunctionInvocationError("Closeable#close")
});
Kotlin.parseInt = function (str) {
return parseInt(str, 10);
};