Abstract getters/setters are not yet supported
- Perhaps in future versions. The implementation details will not be ironed out before v0.1.0 and we can easily add it in the future without breaking BC. Getters/setters have not had too much attention thusfar in ease.js due to testing with systems that must work across many environments, including pre-ES5.perfodd
parent
6295b83ec7
commit
4ada84e3b7
|
@ -283,6 +283,14 @@ exports.prototype.validateGetterSetter = function(
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
// abstract getters/setters are not yet supported
|
||||||
|
if ( keywords[ 'abstract' ] )
|
||||||
|
{
|
||||||
|
throw TypeError(
|
||||||
|
"Cannot declare getter/setter '" + name + "' as abstract"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ( prev || prev_gs )
|
if ( prev || prev_gs )
|
||||||
{
|
{
|
||||||
// perform this check first, as it will make more sense than those that
|
// perform this check first, as it will make more sense than those that
|
||||||
|
|
|
@ -37,6 +37,13 @@ require( 'common' ).testCase(
|
||||||
shared.quickFailureTest.apply( _self, arguments );
|
shared.quickFailureTest.apply( _self, arguments );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.quickKeywordTest = function( keywords, identifier, prev )
|
||||||
|
{
|
||||||
|
shared.quickKeywordTest.call( this,
|
||||||
|
'validateGetterSetter', keywords, identifier, prev
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
this.quickVisChangeTest = function( start, override, failtest, failstr )
|
this.quickVisChangeTest = function( start, override, failtest, failstr )
|
||||||
{
|
{
|
||||||
shared.quickVisChangeTest.call( _self, start, override, failtest,
|
shared.quickVisChangeTest.call( _self, start, override, failtest,
|
||||||
|
@ -136,4 +143,15 @@ require( 'common' ).testCase(
|
||||||
_self.quickVisChangeTest( cur[ 0 ], cur[ 1 ], true, 'conflict' );
|
_self.quickVisChangeTest( cur[ 0 ], cur[ 1 ], true, 'conflict' );
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract getter/setters are not yet supported. They may be supported in
|
||||||
|
* the future. Disallowing them now will allow us to determine an
|
||||||
|
* implementation in the future without breaking BC.
|
||||||
|
*/
|
||||||
|
'Cannot declare abstract getters/setters': function()
|
||||||
|
{
|
||||||
|
this.quickKeywordTest( [ 'abstract' ], 'abstract' );
|
||||||
|
},
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue