eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
663 stars 61 forks source link

Infer mixed type with action and rule call #1541

Closed msujew closed 2 weeks ago

msujew commented 3 weeks ago

Closes https://github.com/eclipse-langium/langium/issues/1540

The main issue was that the array copy call in line 239 was missing. Instead, all rule calls were copied to all paths, which was pretty incorrect. I believe this accidentally worked as expected but broke with #1473.

msujew commented 3 weeks ago

cc @cdietrich Can you check whether this PR fixes the issue for you?

cdietrich commented 3 weeks ago

@msujew do you have any steps how i can easily test it?

cdietrich commented 3 weeks ago

tried with

"dependencies": {
        "langium": "file:///Users/dietrich/git/langium/packages/langium",
        "vscode-languageclient": "~9.0.1",
        "vscode-languageserver": "~9.0.1"
    },
    "devDependencies": {
        "@types/node": "^18.0.0",
        "@typescript-eslint/parser": "~7.3.1",
        "@typescript-eslint/eslint-plugin": "~7.3.1",
        "eslint": "~8.57.0",
        "langium-cli": "file:///Users/dietrich/git/langium/packages/langium-cli",

and it seems to work

msujew commented 3 weeks ago

@cdietrich I've also just published 3.1.0-next.cbc5db3, in case you want to try that which contains the changes.

cdietrich commented 3 weeks ago

thx. we are compilable again. so i can continue evaluating

cdietrich commented 3 weeks ago

looks good

msujew commented 3 weeks ago

@cdietrich Thank you for testing :)