- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 55
 
Open
Description
I was writting something like this and I found that it always crashes after modifying the part before the switch
enum MyEnum {
   First,
   Second,
   Third
}
struct MyThing {
   int x;
   MyEnum thing;
}
void thing() {
   MyThing thing;
   MyThing thing2;
   MyThing thing3;
   MyThing[] things = [thing, thing2, thing3];
   foreach (const ref MyThing t; things) {
      switch (t.thing) {
      case MyEnum.First:
         break;
      case MyEnum.Second:
         break;
      default:
         break;
      }
   }
}
For example it crashes after adding something like:
int i
 switch (t.thing) {
      case MyEnum.First:
...
This causes a segfault in libc.
I saw this in the log before the crash:
Expected `;` instead of `switch`\n"
I tested with master and the latest beta, I'm using it in Neovim
Metadata
Metadata
Assignees
Labels
No labels