raml-org / raml-js-parser-2

(deprecated)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple inheritance allows to create [string, nil] attributes, bug?

alvassin opened this issue · comments

From documentation: Also, it is not allowed to inherit from different kind of primitive types, for example [ number, string ]

I understand why it is possible to inherit [any, string] or [number, integer] (it is used same branch of derived raml types).

But what about [number, nil]? From my point of view it should be not allowed. Is that a but of raml-js-parser?

number | nil is a valid union type. but not [number, nil] derived type.

Hi @alvassin !

The fix is going to be published in 1.1.45

Regards,
Konstantin