1
0
Fork 0

Fix protected mixin override for ES3 fallbacks

It's fun when you're about to make a release and find that ES3 fallback
tests are failing.  That's also what happens when you decide not to run
the combined tests until the last minute, because they usually don't fail.
master
Mike Gerwitz 2015-10-26 22:34:43 -04:00
parent 903a1a135c
commit 8707e537ab
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 12 additions and 2 deletions

View File

@ -740,7 +740,17 @@ function mixMethods( src, dest, vis, iname, inparent )
continue; continue;
} }
var keywords = src[ f ].___$$keywords$$, var keywords = src[ f ].___$$keywords$$;
// TODO: This is a kluge to handle ES3 fallbacks, which will cause
// protected members to appear on the public prototype. A more
// elegant solution is to automatically add the public keyword when
// the class is built, so we can just check if keywords[vis] exists.
if ( ( vis === 'public' ) && keywords[ 'protected' ] )
{
continue;
}
vis = keywords[ 'protected' ] ? 'protected' : 'public'; vis = keywords[ 'protected' ] ? 'protected' : 'public';
// if abstract, then we are expected to provide the implementation; // if abstract, then we are expected to provide the implementation;