[Issue 20607] [shared] static constructor & co can be called as regular function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 25 04:08:51 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20607

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

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

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Geod24 created dlang/dmd pull request #10834 "Fix issue 20607 - Module
constructors are visible as regular function" fixing this issue:

- Fix issue 20607 - Module constructors are visible as regular function

  This breaks the type system pretty easily.
  If the user *really* want to do something funky,
  they can still declare those as `extern(C)` and there isn't
  much we can (or will) do about it.

  But having those functions available in the symtab
  means they show up in `impHint` and can be called by
  accident (e.g. a bug in code generation that use `__allMembers`).

  There is still an issue with variable, but since it doesn't
  break the type system, and comes with a refactor,
  it is left for a later PR.

https://github.com/dlang/dmd/pull/10834

--


More information about the Digitalmars-d-bugs mailing list