D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14448 - Compiler crashes when getting the address of a function in MemberFunctionTuple
Summary: Compiler crashes when getting the address of a function in MemberFunctionTuple
Status: RESOLVED DUPLICATE of issue 13920
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-14 12:05 UTC by Filippo Fantini
Modified: 2015-04-14 13:26 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 Filippo Fantini 2015-04-14 12:05:20 UTC
module test;

class Foo
{
    void foo()
    {
        import std.traits;

        alias funs = MemberFunctionsTuple!( typeof( this ), "bar" );

        void function( string ) b = &funs[ 0 ];
        
        b( "world" );
    }

    void bar( string s )
    {
        import std.stdio;
        writeln( "hello ", s );
    }
}

void main()
{
    auto f = new Foo();
    f.foo();
}


On Ubuntu (but it has been tested on windows too )

dmd test.d 

causes segmentation fault
Comment 1 Kenji Hara 2015-04-14 13:26:28 UTC

*** This issue has been marked as a duplicate of issue 13920 ***