[Issue 17140] New: Segfault when using function-name-qualified renamed import as function return type

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 3 09:04:01 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17140

          Issue ID: 17140
           Summary: Segfault when using function-name-qualified renamed
                    import as function return type
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dhasenan at gmail.com

I don't know if this is supposed to be valid code or not.

Code:

foo.socks.Socket foo()
{
    import socks = std.socket;
    return null;
}

Stacktrace:

#0  0x000000000059a934 in Scope::search(Loc, Identifier*, Dsymbol**, int) ()
#1  0x0000000000671eb3 in TypeIdentifier::resolve(Loc, Scope*, Expression**,
Type**, Dsymbol**, bool) ()
#2  0x000000000067210a in TypeIdentifier::semantic(Loc, Scope*) ()
#3  0x000000000066d5a0 in TypeFunction::semantic(Loc, Scope*) ()
#4  0x00000000005d5658 in VarExp::semantic(Scope*) ()
#5  0x00000000005d9247 in UnaExp::unaSemantic(Scope*) ()
#6  0x00000000005dc737 in DotIdExp::semanticX(Scope*) ()
#7  0x00000000005dcf4e in DotIdExp::semanticY(Scope*, int) ()
#8  0x00000000005dc639 in DotIdExp::semantic(Scope*) ()
#9  0x00000000005d9247 in UnaExp::unaSemantic(Scope*) ()
#10 0x00000000005dc737 in DotIdExp::semanticX(Scope*) ()
#11 0x00000000005dcf4e in DotIdExp::semanticY(Scope*, int) ()
#12 0x00000000005dc639 in DotIdExp::semantic(Scope*) ()
#13 0x0000000000671238 in TypeQualified::resolveHelper(Loc, Scope*, Dsymbol*,
Dsymbol*, Expression**, Type**, Dsymbol**, bool) ()
#14 0x0000000000671efc in TypeIdentifier::resolve(Loc, Scope*, Expression**,
Type**, Dsymbol**, bool) ()

--


More information about the Digitalmars-d-bugs mailing list