Thread overview
[Issue 24238] Confusing "not an lvalue"error messages
Nov 10, 2023
Dennis
Nov 10, 2023
Dlang Bot
Nov 12, 2023
Dlang Bot
November 10, 2023
https://issues.dlang.org/show_bug.cgi?id=24238

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #1 from Dennis <dkorpel@live.nl> ---
* Accidentally submitted to early *

See: https://forum.dlang.org/thread/ealqnukwfgosusrzzsbh@forum.dlang.org

```
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.

--
November 10, 2023
https://issues.dlang.org/show_bug.cgi?id=24238

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@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

--
November 12, 2023
https://issues.dlang.org/show_bug.cgi?id=24238

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
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

--