From ba28f0a753fbcf107afe08ce8de5fc99702f2aef Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 28 Nov 2011 15:10:26 -0500 Subject: [PATCH] Now implicitly adding abstract keyword for interface method declarations --- lib/util.js | 5 ++++- test/test-class-implement.js | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index cf4b4d6..88f1731 100644 --- a/lib/util.js +++ b/lib/util.js @@ -297,8 +297,11 @@ exports.propParse = function( data, options ) name = parse_data.name || prop; keywords = parse_data.keywords || {}; - if ( options.assumeAbstract || keywords['abstract'] ) + if ( options.assumeAbstract || keywords[ 'abstract' ] ) { + // may not be set if assumeAbstract is given + keywords[ 'abstract' ] = true; + if ( !( value instanceof Array ) ) { throw TypeError( diff --git a/test/test-class-implement.js b/test/test-class-implement.js index 0ee77ba..feb5d7b 100644 --- a/test/test-class-implement.js +++ b/test/test-class-implement.js @@ -31,12 +31,13 @@ var common = require( './common' ), ; +// test with and without abstract keyword var Type = Interface.extend( { 'abstract foo': [], }), Type2 = Interface.extend( { - 'abstract foo2': [], + foo2: [], }), Foo = {},