Adventure Game Studio

AGS Development => Editor Development => Topic started by: Monsieur OUXX on Fri 22/09/2017 13:52:36

Title: [minor bug] Incorrect autocomplete in switch-case
Post by: Monsieur OUXX on Fri 22/09/2017 13:52:36
In 3.4.0.16 (i.e. patch 4) :

Code (ags) Select

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.
Title: Re: [minor bug] Editor suggests "ID" as autocompletion for AudioClip
Post by: Monsieur OUXX on Fri 22/09/2017 14:06:58
It's actually trickier than that :

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

Code (ags) Select

    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.
Title: Re: [minor bug] Incorrect autocomplete in switch-case
Post by: Crimson Wizard on Fri 22/09/2017 15:33:53
Need to also check 3.4.1, there were certain fixes to switch.