[minor bug] Incorrect autocomplete in switch-case

Started by Monsieur OUXX, Fri 22/09/2017 13:52:36

Previous topic - Next topic

Monsieur OUXX

In 3.4.0.16 (i.e. patch 4) :

Code: ags

AudioClip* ac;
ac.

When you do this and stop at the dot, you receive suggestions for AudioClip members, including "ID" which is not a member of AudioClip (only AudioChannel)
If you try to force it and type "ID", then of course the compiler complains about it.
 

Monsieur OUXX

It's actually trickier than that :

It's the switch...case that doesn't manage well two variables with the same name:

Code: ags

    switch (...)
    {
        case  0: {
            AudioChannel* ac; return ac.ID;
            break;
        }
        case  1: {
            AudioClip* ac; return ac.xxx //  <-- problem here
            break;
        }
    }
    




I guess everyone can totally live with that. Super low priority.
 

Crimson Wizard

Need to also check 3.4.1, there were certain fixes to switch.

SMF spam blocked by CleanTalk