Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Port derefs.nim in Nimony to Nim 2

Open demotomohiro opened this issue 3 months ago • 1 comments

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

demotomohiro avatar Sep 20 '25 16:09 demotomohiro

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.

Araq avatar Sep 21 '25 04:09 Araq