}
final SchemaPath path;
- if ((StmtContextUtils.producesDeclared(getParentContext(), ChoiceStatement.class)
+ if ((StmtContextUtils.producesDeclared(parent, ChoiceStatement.class)
|| Boolean.TRUE.equals(parent.getFromNamespace(AugmentToChoiceNamespace.class, parent)))
&& isSupportedAsShorthandCase()) {
path = parentPath.createChild(qname);
final boolean isConfig;
if (configStatement != null) {
- isConfig = configStatement.getStatementArgument();
+ isConfig = configStatement.coerceStatementArgument();
// Validity check: if parent is config=false this cannot be a config=true
InferenceException.throwIf(isConfig && !parentIsConfig, getStatementSourceReference(),