Fixed up a bug and 2 tests, plus added a better error for when a method isn't found. 69 tests passing! This is everything before ADTs (because of some tests with no success condition, some that depend on the compiler stdlib parts, etc)

This commit is contained in:
Nathan Braswell
2016-03-12 04:46:49 -05:00
parent 6a1c210b8a
commit 6fff4c5363
4 changed files with 34 additions and 45 deletions

View File

@@ -5,10 +5,13 @@ import vector_literals:*
obj AbleToBeDestroyed (Object) {
var data:int
fun construct(dat:int):void {
// needed to put it in the vector becuase serilization uses pairs, which defines an empty constructor
fun construct(): *AbleToBeDestroyed return this;
fun construct(dat:int): *AbleToBeDestroyed {
data = dat
print("Constructed: ")
println(data)
return this
}
fun copy_construct(other:*AbleToBeDestroyed):void {
data = other->data+1