mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 14:40:40 +03:00
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:
parent
a4005d80a0
commit
b83780538f
4 changed files with 18 additions and 114 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue