Add casting as a language feature. Have not removed the function yet as we need an inbetween version for the bootstrap

This commit is contained in:
Nathan Braswell
2016-04-18 22:56:29 -04:00
parent d5b930739f
commit cf46fb13af
7 changed files with 71 additions and 9 deletions

View File

@@ -185,6 +185,7 @@ obj type (Object) {
}
fun clone(): *type return clone_with_indirection(indirection, is_ref);
fun clone_without_ref(): *type return clone_with_indirection(indirection, false);
fun clone_with_ref(): *type return clone_with_indirection(indirection, true);
fun clone_with_increased_indirection(): *type return clone_with_indirection(indirection+1);
fun clone_with_increased_indirection(more: int, is_ref_in: bool): *type return clone_with_indirection(indirection+more, is_ref_in);
fun clone_with_decreased_indirection(): *type return clone_with_indirection(indirection-1);