[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2021-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

--- Comment #9 from Dlang Bot  ---
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++
port" was merged into dmd-cxx:

- 2f4d3b7d3c9badd4f902343b18548aeda7f10197 by Biotronic:
  [dmd-cxx] Fix issue 16206 - getOverloads fails when first overload is
template

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

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2020-05-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

--- Comment #8 from Richard Manthorpe  ---
Sorry, this: https://issues.dlang.org/show_bug.cgi?id=20833

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2020-05-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

Richard Manthorpe  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Richard Manthorpe  ---
I was thinking about this: https://issues.dlang.org/show_bug.cgi?id=20821

But now I come to think of it, it is subtly different. I've re-marked it
resolved.

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2020-05-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

--- Comment #6 from Basile-z  ---
To prevent a breaking change a 3rd trait parameter was added. When you add an
optional bool then templates are included, no matter the lexical order.

---
struct Foo
{
void foo(A,Z)(A a, Z z){}
void foo(float v){}
}

struct Bar
{
void bar(float v){}
void bar(A,Z)(A a, Z z){}
}

void main()
{
static assert(__traits(getOverloads, Bar, "bar", true).length == 2);
static assert(__traits(getOverloads, Foo, "foo", true).length == 2);
}
---

There are still overloads bugs, but when alias are used
(https://issues.dlang.org/show_bug.cgi?id=20821). This is something else that
has to do with the fact that once the alias template parameters are missing the
lowering is difficual (declarations cant be lowered like expressions or
statements).

In case I'm wrong on the status of 16206 please provide a new test case that
justify the reopening.

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2020-05-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

Richard Manthorpe  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||rma...@gmail.com
 Resolution|FIXED   |---

--- Comment #5 from Richard Manthorpe  ---
This was never fixed - the bug is to do with the order in which the template
and non-template overload are declared. If the template is declared last it is
fine (as in the DMD tests), otherwise there is a problem.

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2018-05-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dlang.org

https://github.com/dlang/dlang.org/commit/ee9cb9ba7c43a7401f222e0c1cb2063e0c35dd3b
Fix Issue 16206 - traits getOverloads fails when one of the overload is a
templatized function

https://github.com/dlang/dlang.org/commit/0e3bd088a9e06e0873ea861d299026231217f644
Merge pull request #2351 from Biotronic/Issue16206

Fix Issue 16206 - traits getOverloads fails when one of the overload is a
templatized function
merged-on-behalf-of: Mike Franklin 

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2018-05-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/b52561fc497b70380c2ecd8ebd92cf11c31f0a36
Fix issue 16206 - getOverloads fails when first overload is template

https://github.com/dlang/dmd/commit/1ea020fcd22a8e1ee797328cba9f0c223dfba3bc
Merge pull request #8195 from Biotronic/Issue16206

Fix Issue 16206 - traits getOverloads fails when one of the overload is a
templatized function
merged-on-behalf-of: unknown

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2018-04-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

Simen Kjaeraas  changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com

--- Comment #2 from Simen Kjaeraas  ---
PR: https://github.com/dlang/dmd/pull/8195

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2018-04-11 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

johanenge...@weka.io changed:

   What|Removed |Added

   Keywords||industry
 CC||johanenge...@weka.io

--


[Issue 16206] traits getOverloads fails when one of the overload is a templatized function

2018-03-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16206

Adam D. Ruppe  changed:

   What|Removed |Added

 CC||destructiona...@gmail.com

--- Comment #1 from Adam D. Ruppe  ---
ah yes i just hit this too and was about to submit. same thing on module level

void foo()() {}
void foo(int) {}

void main() {
foo(); // works
foo(0); // also works so they seem to be overloaded...

// yet this empty
pragma(msg, __traits(getOverloads, mixin(__MODULE__), "foo"));

// note: if you swap the order of the declarations above, it will
// actually show one foo in the message
}

--