Nim
Nim copied to clipboard
Port derefs.nim in Nimony to Nim 2
Port derefs.nim in Nimony to Nim 2 and remove hacks from Nim 2.
Steps:
-
Borrow / Mutability checks
- [ ] locations
- [ ] return statements
- [ ] assign statements
- [ ] yield statements
- [ ] call expressions
-
Add hidden deref/addr
- [ ] location
- [ ] call expression
- [ ] deref
-
[ ] Check for dangerous locations
The "Check for dangerous locations" is required by polymorphic accessors which Nim 2.0 does not have. But it's a good idea to add them too so that Nim 2.0 can get polymorphic accessors.