We are using version 2.0.11.
The YANG parser does not complain if an "if-feature" statement refers to a feature that is not defined in the YANG model. See the example model attached: this parses without error.
This should be an error according to https://tools.ietf.org/html/rfc7950#section-7.20.2 :
If a prefix is present on a feature name in the boolean expression, the prefixed name refers to a feature defined in the module that was imported with that prefix, or the local module if the prefix matches the local module's prefix. Otherwise, a feature with the matching name MUST be defined in the current module or an included submodule.
pyang throws the following error for this:
example.yang:9: error: feature "test-feature" not found in module example