Commit 4e00a7a
committed
allow
Form D's `:= EXPR` branch now accepts the `autofree` keyword the same
way Form C does. The class-instance check downstream rejects autofree
on non-class targets, so aggregate-literal init (records/arrays) still
errors as expected. Brings Form D to full feature parity with Form C
on the autofree axis.
```pas
with var a: TStringList := autofree TStringList.Create do
a.Add('hello');
// a.Free called here
```autofree in with var NAME : TYPE := EXPR do
1 parent cd0326d commit 4e00a7a
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1697 | 1697 | | |
1698 | 1698 | | |
1699 | 1699 | | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
1700 | 1707 | | |
1701 | 1708 | | |
1702 | 1709 | | |
1703 | 1710 | | |
1704 | | - | |
1705 | | - | |
| 1711 | + | |
| 1712 | + | |
1706 | 1713 | | |
1707 | 1714 | | |
1708 | 1715 | | |
| |||
0 commit comments