Fixed up testing etc
This commit is contained in:
20
tests/test_typeExpr.krak
Normal file
20
tests/test_typeExpr.krak
Normal file
@@ -0,0 +1,20 @@
|
||||
import io;
|
||||
|
||||
typedef ClassWithConstructor {
|
||||
|int| data;
|
||||
|ClassWithConstructor*| construct(|int| inData) {
|
||||
data = inData;
|
||||
return this;
|
||||
}
|
||||
|void| printData() {
|
||||
io::println(data);
|
||||
}
|
||||
};
|
||||
|
||||
|int| main() {
|
||||
|ClassWithConstructor| object.construct(4);
|
||||
object.printData();
|
||||
|int| a = 8;
|
||||
io::println(a);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user