Bug 20656 – cannot compile live function without -preview=dip1021

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-03-09T23:06:13Z
Last change time
2020-03-19T06:35:34Z
Keywords
pull
Assigned to
No Owner
Creator
Hiroki Noda

Comments

Comment #0 by kubo39 — 2020-03-09T23:06:13Z
Code: --- import core.stdc.stdlib : free, malloc; @live void main() { auto p = malloc(1); free(p); free(p); } --- Output: --- $ dmd bugfix.d bugfix.d(8): Error: variable bugfix.main.p has undefined state and cannot be read bugfix.d(8): Error: variable bugfix.main.p is not Owner, cannot consume its value ---
Comment #1 by dlang-bot — 2020-03-09T23:10:08Z
@kubo39 created dlang/dmd pull request #10883 "Fix Issue 20656 - cannot compile live function without -preview=dip1021" fixing this issue: - Fix Issue 20656 - cannot compile live function without -preview=dip1021 https://github.com/dlang/dmd/pull/10883
Comment #2 by bugzilla — 2020-03-10T08:13:21Z
Comment #3 by dlang-bot — 2020-03-19T06:35:34Z
dlang/dmd pull request #10883 "Fix Issue 20656 - cannot compile live function without -preview=dip1021" was merged into stable: - 1a065b7f11749bad2e27731f94121e5b2dc4dc04 by Hiroki Noda: Fix Issue 20656 - cannot compile live function without -preview=dip1021 https://github.com/dlang/dmd/pull/10883