Bug 24238 – Confusing "not an lvalue"error messages

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-11-10T14:41:20Z
Last change time
2023-11-12T23:40:42Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Dennis

Comments

Comment #0 by dkorpel — 2023-11-10T14:41:20Z
Comment #1 by dkorpel — 2023-11-10T14:43:13Z
* Accidentally submitted to early * See: https://forum.dlang.org/thread/[email protected] ``` void templateFunc(T)() {} void addr() { auto x0 = &templateFunc; } ``` The error says "is not an lvalue and cannot be modified", but it should say instead that it's a template, and you cannot take the address of it before instantiating it.
Comment #2 by dlang-bot — 2023-11-10T14:45:17Z
@dkorpel created dlang/dmd pull request #15793 "Fix 24238 - Confusing "not an lvalue"error messages" fixing this issue: - Fix 24238 - Confusing "not an lvalue"error messages https://github.com/dlang/dmd/pull/15793
Comment #3 by dlang-bot — 2023-11-12T23:40:42Z
dlang/dmd pull request #15793 "Fix 24238 - Confusing "not an lvalue"error messages" was merged into master: - 3cd58d1a4f74cdc9dcdc0e8b9d2f23aa06702305 by Dennis Korpel: Fix 24238 - Confusing "not an lvalue"error messages https://github.com/dlang/dmd/pull/15793