The difference between the two is that one only allows plain text, while the other also allows for translatable texts. FormattedText is fully assignable to Text, but the current mcdoc runtime checker logic will recurse indefinitely into the reference Text types.
To fix this, we need to keep track of reference types and what they have been compared against so far to bail out in this case.
the isAssignable logic should be able to handle recursive types. This may occur when for example comparing these two mcdoc definitions:
and
The difference between the two is that one only allows plain text, while the other also allows for translatable texts.
FormattedText
is fully assignable toText
, but the current mcdoc runtime checker logic will recurse indefinitely into the reference Text types.To fix this, we need to keep track of reference types and what they have been compared against so far to bail out in this case.