Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
November 10, 2022 [Issue 23473] Need a way to disassemble an overload function | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 --- Comment #1 from FeepingCreature <default_357-line@yahoo.de> --- Oops, pressed return too soon. Consider this code: --- b.d void first(int) { } --- a.d import b : foo = first; import c : foo = second; void main() { foo(1); // works foo("hello"); // works alias overloads = __traits(getOverloads, __traits(parent, foo), __traits(identifier, foo)); static assert(overloads.length == 2); } --- c.d void second(string) { } Because the overload we want is not of a struct or class, we use the common pattern, for example used in https://dlang.org/blog/category/algorithms/ , to get "the module" the overload is in. But there is no such module, because the overload is formed from two other modules that don't even use the same identifier for it. There should be an overload or trait alternative to getOverloads that operates on a symbol directly. -- |
November 10, 2022 [Issue 23473] Need a way to disassemble an overload function without referencing a parent | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 FeepingCreature <default_357-line@yahoo.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Need a way to disassemble |Need a way to disassemble |an overload function |an overload function | |without referencing a | |parent -- |
November 10, 2022 [Issue 23473] Need a way to disassemble an overload function without referencing a parent | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 FeepingCreature <default_357-line@yahoo.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry -- |
November 10, 2022 [Issue 23473] Need a way to disassemble an overload function without referencing a parent | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 --- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> --- @FeepingCreature created dlang/dmd pull request #14631 "Issue 23473: Improvement: Implement single-argument __traits(getOverloads) form." mentioning this issue: - Issue 23473: Improvement: Implement single-argument __traits(getOverloads) form. https://github.com/dlang/dmd/pull/14631 -- |
November 10, 2022 [Issue 23473] Need a way to disassemble an overload function without referencing a parent | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 Ketmar Dark <ketmar@ketmar.no-ip.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ketmar@ketmar.no-ip.org -- |
December 17, 2022 [Issue 23473] Need a way to disassemble an overload function without referencing a parent | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P4 -- |
December 13 [Issue 23473] Need a way to disassemble an overload function without referencing a parent | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23473 --- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18134 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation