diff --git a/lib/jsduck/process/inherit_members.rb b/lib/jsduck/process/inherit_members.rb index 00a832534bac01bbba2ee78c7a6ed1ade689d828..4110732ac19bd56753e9a81aa8eaa69069c1edd7 100644 --- a/lib/jsduck/process/inherit_members.rb +++ b/lib/jsduck/process/inherit_members.rb @@ -19,6 +19,7 @@ module JsDuck # - :params # - :return # - :throws + # - :properties # # In case of auto-detected members that inherit from a public # member in parent class, we inherit all fields that aren't diff --git a/spec/aggregator_inheritdoc_spec.rb b/spec/aggregator_inheritdoc_spec.rb index a52bab2cc2ccdba87f714c96e217aed8a378b402..367241221621af1b22784a6c3fbaf355902854d9 100644 --- a/spec/aggregator_inheritdoc_spec.rb +++ b/spec/aggregator_inheritdoc_spec.rb @@ -164,6 +164,30 @@ describe JsDuck::Aggregator do end end + describe "@inheritdoc in @cfg with subproperties" do + before do + @docs = parse(<<-EOF) + /** @class Foo */ + /** + * @cfg {Object} foo Original comment. + * @cfg {String} foo.name Some name + * @cfg {Number} foo.value Some value + */ + + /** @class Inh1 */ + /** + * @cfg foo + * @inheritdoc Foo#foo + */ + EOF + @inh1 = @docs["Inh1"][:members][0] + end + + it "inherits subproperties" do + @inh1[:properties].length.should == 2 + end + end + describe "@inheritdoc with type info" do before do @docs = parse(<<-EOF)