Description
Given the following IDL:
interface OfflineAudioContext : BaseAudioContext {
constructor(OfflineAudioContextOptions contextOptions);
constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate);
};
If I parse it, then call widl.normalized_method_names("constructor()")
, I get only one method name returned - the latter. Even if I'm more specific and call it with "constructor(contextOptions)", it returns the latter.
If I swap the order of the constructors it changes which is returned, so it's definitely some "last wins" thing going on accidentally.
However, if I call .find_all("constructor()")
, I get both constructs, so they're definitely both around. But if I then call .find_all("OfflineAudioContext/constructor(contextOptions)")
I also get both constructs, so it's not discriminating properly somehow.
(This is messing up some code in Bikeshed that tries to normalize a constructor/method name, then call .find()
to get the corresponding construct and do some stuff with its arguments. Since it's returning the wrong constructor, it fails to find the expected arguments and complains a bunch!)
(I haven't yet checked if this affects all methods, or just constructors.)