Type alias circularly reference error #729
Answered
by
msujew
luan-xiaokun
asked this question in
Q&A
-
Hi guys, I am using langium 0.5, and I got the error
If the |
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Oct 21, 2022
Replies: 1 comment 3 replies
-
Hey @luan-xiaokun, usually you would try to make |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
luan-xiaokun
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @luan-xiaokun,
usually you would try to make
BracketTerm
infer the same type asTerm
for this. This prevents the circular type reference. See the following example in the arithmetics example:https://github.com/langium/langium/blob/9f587815f9d14f433d22831ac11d3b9f11696d9f/examples/arithmetics/src/language-server/arithmetics.langium#L31-L34