mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
fix bugzilla Issue 23515 - Named Enum of function SIGSEGFAULT (#16117)
* fix 23515 * fix bugzilla Issue 23515 - Named Enum of function SIGSEGFAULT
This commit is contained in:
parent
632e04dfff
commit
849cb90272
2 changed files with 16 additions and 0 deletions
|
@ -503,6 +503,8 @@ void enumMemberSemantic(Scope* sc, EnumMember em)
|
|||
{
|
||||
Expression e = em.value;
|
||||
assert(e.dyncast() == DYNCAST.expression);
|
||||
if (em.ed.memtype)
|
||||
e = inferType(e, em.ed.memtype);
|
||||
e = e.expressionSemantic(sc);
|
||||
e = resolveProperties(sc, e);
|
||||
e = e.ctfeInterpret();
|
||||
|
|
|
@ -155,6 +155,19 @@ class C7379
|
|||
}
|
||||
}
|
||||
|
||||
/***********************************/
|
||||
// https://issues.dlang.org/show_bug.cgi?id=23515
|
||||
|
||||
enum Easing : void function()
|
||||
{
|
||||
identity1 = (){},
|
||||
}
|
||||
|
||||
void test23515()
|
||||
{
|
||||
Easing.identity1();
|
||||
}
|
||||
|
||||
/***********************************/
|
||||
|
||||
int main()
|
||||
|
@ -166,6 +179,7 @@ int main()
|
|||
test5();
|
||||
test6();
|
||||
test7();
|
||||
test23515();
|
||||
|
||||
printf("Success\n");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue