1
0
Fork 0

Resolved failing test (methods may only be overridden with methods) with propParse() 'each'

closure/master
Mike Gerwitz 2010-12-07 00:41:30 -05:00
parent 994b8e16fa
commit 52b1ef657f
1 changed files with 11 additions and 6 deletions

View File

@ -206,6 +206,17 @@ exports.propCopy = function( props, dest, result_data )
// default functionality
var actions = {
each: function( name, value )
{
// methods can only be overridden with methods
if ( ( dest[ name ] instanceof Function )
&& ( !( value instanceof Function ) )
)
{
throw new TypeError( "Cannot override method with non-method" );
}
},
property: function( name, value )
{
dest[ name ] = value;
@ -338,12 +349,6 @@ function method_override(
super_method, new_method, name, abstract_map, abstract_methods, data
)
{
// ensure we're overriding the method with another method
if ( !( new_method instanceof Function ) )
{
throw new TypeError( "Cannot override method with non-method" );
}
if ( abstract_map[ name ] !== undefined )
{
var is_abstract = exports.isAbstractMethod( new_method );