ID:2068547
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Would it be possible for repeated switch cases to throw a warning? I just spent at least an hour debugging code because I had
switch(N)

if(1)
src2 = BYTE_ONE(src2) + BYTE_ONE(Int1)
src1 = BYTE_ONE(src1) + BUFFER(src2)

if(2)
src3 = BYTE_ONE(src3) + BYTE_ONE(Int2)
src2 = BYTE_ONE(src2) + BYTE_ONE(Int1) + BUFFER(src3)
src1 = BYTE_ONE(src1) + BUFFER(src2)

if(2) // Repeated here, instead of if(3).
src4 = BYTE_ONE(src4) + BYTE_ONE(Int3)
src3 = BYTE_ONE(src3) + BYTE_ONE(Int2) + BUFFER(src4)
src2 = BYTE_ONE(src2) + BYTE_ONE(Int1) + BUFFER(src3)
src1 = BYTE_ONE(src1) + BUFFER(src2)

There is no scenario—given DM's switch statement behavior—where you would actually want this (or at least no scenario I can conceive of).
Hmm. Potentially difficult but not impossible. I'll have to study the code that compiles the switch.