[Issue 13465] Segfault in dmd (2.066.0 and 2.067.0-b1)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Sep 13 09:37:32 PDT 2014


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

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar at ketmar.no-ip.org

--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
seems that compiler forgot to call `VarDeclaration::semantic()` on
"isMatchingMaskField", but calls `VarDeclaration::semantic2()` for it. then it
sees that `if (init && !toParent()->isFuncDeclaration())` is true and tries to
call `init = init->semantic(sc, type, INITinterpret)`, but… but `type` is NULL
here, 'cause no semantic() was done before.

with hacked in `if (!type) semantic(sc);` to the beginning of
`VarDeclaration::semantic2()` compiler correctly complains that it cannot infer
type.

but i don't understand semantic code yet, so let's wait for someone
knowledgable to find why `semantic2()` was called without `semantic()` here.

--


More information about the Digitalmars-d-bugs mailing list