← Back to index
|
Original Bugzilla link
Bug 17140 – Segfault when using function-name-qualified renamed import as function return type
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-02-03T17:04:01Z
Last change time
2020-03-21T03:56:40Z
Keywords
ice
Assigned to
No Owner
Creator
Neia Neutuladh
Comments
Comment #0
by dhasenan — 2017-02-03T17:04:01Z
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) ()
Comment #1
by dhasenan — 2017-02-03T17:06:18Z
Doesn't have to be a static import: --- fun.S fun() { import std.socket; alias S = Socket; return null; } ---
Comment #2
by b2.temp — 2019-03-02T09:55:47Z
*** This issue has been marked as a duplicate of issue 17290 ***