parent
f9b951ddb2
commit
6e7e031ff9
|
@ -22,9 +22,6 @@
|
|||
* @package core
|
||||
*/
|
||||
|
||||
// XXX: remove dependency
|
||||
var Warning = require( __dirname + '/warn' ).Warning;
|
||||
|
||||
|
||||
module.exports = exports = function MemberBuilderValidator()
|
||||
{
|
||||
|
@ -150,7 +147,7 @@ exports.prototype.validateMethod = function(
|
|||
// supertype, unless otherwise specified
|
||||
//
|
||||
// IMPORTANT: do this last, to ensure we throw errors before warnings
|
||||
if ( !( keywords[ 'new' ] || keywords[ 'override' ] ) )
|
||||
if ( !( keywords[ 'override' ] )
|
||||
{
|
||||
if ( !( prev_keywords[ 'abstract' ] ) )
|
||||
{
|
||||
|
|
|
@ -524,6 +524,8 @@ var common = require( './common' ),
|
|||
}, Error, "Can escalate visibility of subtype members" );
|
||||
|
||||
// same level of visibility
|
||||
assert.doesNotThrow( function()
|
||||
{
|
||||
Class(
|
||||
{
|
||||
'protected foo': 'bar',
|
||||
|
@ -532,6 +534,7 @@ var common = require( './common' ),
|
|||
'protected foo': 'bar',
|
||||
'override protected baz': function() {},
|
||||
} );
|
||||
}, Error, "Can retain level of visibility for subtype members" );
|
||||
} )();
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue