Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 19, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> --- @BorisCarvajal created dlang/dmd pull request #10946 "Fix Issue 20687 - Allow member function address as const initializer" fixing this issue: - Fix Issue 20687 - Allow member function address as const initializer https://github.com/dlang/dmd/pull/10946 -- |
March 20, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #10946 "Fix Issue 20687 - Allow member function address as const initializer" was merged into stable: - 4ad1a199e2d5a9a0b87b1513e5690b9e29a8ed54 by Boris Carvajal: Fix Issue 20687 - Allow member function address as const initializer https://github.com/dlang/dmd/pull/10946 -- |
March 22, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 --- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #10948 "Revert "Fix Issue 20687 - Allow member function address as const initializer"" was merged into stable: - bb766e125c590249730f967892bda6697b4a648b by Iain Buclaw: Revert "Fix Issue 20687 - Allow member function address as const initializer" https://github.com/dlang/dmd/pull/10948 -- |
March 22, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 Mathias LANG <pro.mathias.lang@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |pro.mathias.lang@gmail.com Resolution|FIXED |--- --- Comment #4 from Mathias LANG <pro.mathias.lang@gmail.com> --- This has been re-opened, as it is not clear whether we want it to be possible or not. The fact it's possible at runtime could be considered an accept-invalid, instead of this being a reject-valid. -- |
March 22, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 Steven Schveighoffer <schveiguy@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schveiguy@yahoo.com --- Comment #5 from Steven Schveighoffer <schveiguy@yahoo.com> --- It's very clear to me it should be available at compile time and runtime. Whether it is callable on its own is a matter for debate, but that would be a breaking change. If we made it unavailable at runtime, it is still available with &instance.fun.funcptr. What does funcptr return? If we started disallowing funcptr manipulation, then maybe this becomes invalid, but that is a whole new ball of code breakage that I don't think we want to get into right now. Even if we disallowed creating a variable that accepts such a member-function pointer, a delegate has no type information for it's context pointer, so something like this would still be possible: struct S { int x; void foo() {++x;} } struct T { int *x; void bar() {*x = 5;} } auto s = S(100000); T t; auto dg = &s.foo; dg.funcptr = (&t.bar).funcptr; dg(); // uses s.x as if it were a pointer If we wanted to talk about type safety in this area, the status quo does not cut it. While not type-safe, at least it can be made consistent. -- |
March 23, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 --- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> --- @BorisCarvajal created dlang/dmd pull request #10958 "Fix Issue 20687 - Allow member function address as const initializer" fixing this issue: - Fix Issue 20687 - Allow member function address as const initializer https://github.com/dlang/dmd/pull/10958 -- |
March 28, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 --- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> --- @MoonlightSentinel created dlang/dmd pull request #10970 "Merge branch 'master' into stable" fixing this issue: - Fix Issue 20687 - Allow member function address as const initializer - Merge pull request #10946 from BorisCarvajal/mptr_constinit Fix Issue 20687 - Allow member function address as const initializer merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com> - Revert "Fix Issue 20687 - Allow member function address as const initializer" https://github.com/dlang/dmd/pull/10970 -- |
April 12, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 --- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> --- @MartinNowak created dlang/dmd pull request #11027 "merge stable" fixing this issue: - Fix Issue 20687 - Allow member function address as const initializer - Merge pull request #10946 from BorisCarvajal/mptr_constinit Fix Issue 20687 - Allow member function address as const initializer merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com> - Revert "Fix Issue 20687 - Allow member function address as const initializer" https://github.com/dlang/dmd/pull/11027 -- |
April 21, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #9 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #11027 "merge stable" was merged into master: - 4ad1a199e2d5a9a0b87b1513e5690b9e29a8ed54 by Boris Carvajal: Fix Issue 20687 - Allow member function address as const initializer - aba2deaefdd3bb0ce9d3293b715959a6de416679 by The Dlang Bot: Merge pull request #10946 from BorisCarvajal/mptr_constinit Fix Issue 20687 - Allow member function address as const initializer merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com> - 1f3245d3241d90f4d74b9398558ddc71d57335c4 by Iain Buclaw: Revert "Fix Issue 20687 - Allow member function address as const initializer" https://github.com/dlang/dmd/pull/11027 -- |
April 21, 2020 [Issue 20687] Allow member function address as const initializer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20687 Steven Schveighoffer <schveiguy@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- |
Copyright © 1999-2021 by the D Language Foundation