Revert "Fix issue 21648: remove two lines from dsymbolsem.d. I don't know what they do but it fixes the bug. And doesn't break the testsuite, so ¯\_(ツ)_/¯"

This reverts commit 1ed39162b0.
This commit is contained in:
Walter Bright 2021-02-19 21:03:30 -08:00 committed by The Dlang Bot
parent 6a02a47e26
commit e2ff4e8e0a
2 changed files with 2 additions and 16 deletions

View file

@ -5963,6 +5963,8 @@ void templateInstanceSemantic(TemplateInstance tempinst, Scope* sc, Expressions*
}
tempinst.hasNestedArgs(tempinst.tiargs, tempdecl.isstatic);
if (tempinst.errors)
goto Lerror;
// Copy the tempdecl namespace (not the scope one)
tempinst.cppnamespace = tempdecl.cppnamespace;

View file

@ -1,16 +0,0 @@
// REQUIRED_ARGS: -de
/*
TEST_OUTPUT:
---
fail_compilation/fail21648.d(10): Error: undefined identifier `semantics`
---
*/
template bla() {
semantics error;
}
struct Type {
enum e = __traits(compiles, Type.init);
static if (bla!()) { }
}