qupa-project / uniview-lang

View once immutability enabling the safeties of immutable code, while enjoying near procedural performance
https://uniview.qupa.org
MIT License
2 stars 0 forks source link

Values parsed as constant arguments are not destructed #58

Closed AjaniBilby closed 1 year ago

AjaniBilby commented 3 years ago

Values are not destructed when parsed to a constant argument.

Example:

class Person{ name: int; }

fn println(val: #Person) {
  println(val.name);
}

int main() {
  let p = Blank#[Person]();
  println($p); // the clone was never destructed

  delete p;
}