mukul-rathi / bolt

Bolt is a language with in-built data-race freedom!
MIT License
564 stars 51 forks source link

Check linear references are not aliased #26

Closed mukul-rathi closed 4 years ago

mukul-rathi commented 4 years ago

Use a capture checker of sorts - the idea being that new Foo() is an un-captured object, but let x = (new Foo()) is captured (owned by x).

So check let exprs -> let x = e in ___ is only allowed if either e is not a linear object, or if e is an uncaptured linear object.