enum switch: multiple members in one case not working
Hello, I would like to use the enum switch feature of MPS. I want to define more than one members per switch case. It should be possible to select multiple EnumMemberReference in the members child of EnumSwitchCase. However, the problem is that after I type a comma, I cannot input anything in the "no decl" space, there is no code completion and referencing (emphasis mine).
enum switch (link.sourceCardinality) {
_0__1, _1 -> {
cellCollection.childCellModel.add(< % ^( link )^ %>);
}
_0__n, <no decl> -> {
cellCollection.childCellModel.add(< (> % ^( link )^ % /empty cell: <default> <)>);
}
};
Error message:
"No reference in the obligatory role 'decl'"
I reckon the culprit is the "heuristics" of reference nodes discussed in https://mps-support.jetbrains.com/hc/en-us/community/posts/206614295-Menus-Ctrl-Space-
Is there a workaround? Do we need to report this as a bug?
Please sign in to leave a comment.
Hello Adrian Szegedi!
If you faced this problem in 2019.3 or 2019.3.1 then this is bug, the fix will be included in 2019.3.2.
Thank you for the infromation. Yes, it is in 2019.3.1. When can be 2019.3.2 expected to be released?
I think the bugfix will be available in the beginning of the next week.