D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18669 - isNestedFunction does not check if parameter is a function
Summary: isNestedFunction does not check if parameter is a function
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-27 14:35 UTC by Jack Stouffer
Modified: 2018-03-28 03:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jack Stouffer 2018-03-27 14:35:10 UTC
import std.traits;

class Outer
{
    class Inner
    {
    }
}

void main()
{
    void fun(int i);
    int i;
    struct SS
    {
        int bar() { return i; }
    }
    static assert(isNestedFunction!(fun));
    static assert(isNestedFunction!(SS));
    static assert(isNestedFunction!(Outer.Inner));
}
Comment 1 github-bugzilla 2018-03-28 03:09:05 UTC
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/09cc0bac145422636e88616ce88f8bab3f0adefc
Fix Issue 18669 - isNestedFunction does not check if parameter is a function

https://github.com/dlang/phobos/commit/a6afdef9320f9eb5ccd868928742c274d149a9f1
Merge pull request #6355 from JackStouffer/issue18669

Fix Issue 18669 - isNestedFunction does not check if parameter is a f…
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>