Bug 18979 – Template constructor bypasses private

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-06-13T23:09:44Z
Last change time
2018-11-16T08:16:53Z
Assigned to
No Owner
Creator
Atila Neves

Comments

Comment #0 by atila.neves — 2018-06-13T23:09:44Z
The following compiles but shouldn't: foo.d: struct Foo { private this(A)(A arg) { } } bar.d: import foo; void func() { auto f = Foo(42); }
Comment #1 by razvan.nitu1305 — 2018-07-12T12:13:01Z
Comment #2 by github-bugzilla — 2018-11-16T08:16:52Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c58c4d1f4f2f16e6dcfacbbe1d08a08c2b52235a Fix Issue 18979 - Template constructor bypasses private https://github.com/dlang/dmd/commit/b134d82c51b5fcdfa6fab9f8619a7043ba94a62a Merge pull request #8488 from RazvanN7/Issue_18979 Fix Issue 18979 - Template constructor bypasses private merged-on-behalf-of: Nicholas Wilson <[email protected]>