Adapt to new string-switch lowering

Now all done in the front-end, no need for us to handle it manually
anymore. This also fixes tests/semantic/dcompute.d.
This commit is contained in:
Martin 2018-01-07 01:43:09 +01:00
parent a4005d80a0
commit b83780538f
4 changed files with 18 additions and 114 deletions

View file

@ -169,7 +169,8 @@ struct DComputeSemanticAnalyser : public StoppableVisitor {
stop = true;
}
void visit(SwitchStatement *e) override {
if (!e->condition->type->isintegral()) {
if (e->condition->op == TOKcall &&
static_cast<CallExp *>(e->condition)->f->ident == Id::__switch) {
e->error("cannot `switch` on strings in `@compute` code");
stop = true;
}