Symptom
A Java action parameter typed with a bare enumeration name, without the enum keyword, is stored as an entity type:
create java action MyFirstModule.JA_Paint (C: MyFirstModule.Color) returns Boolean;
check and exec are both clean. mxbuild then reports:
CE1613 "The selected entity 'MyFirstModule.Color' no longer exists."
Writing the type with the keyword works: C: enum MyFirstModule.Color.
This was found while making create java action generate the same .java file as mxbuild (#934) and measured on a fresh Mendix 11.14 app. 10.24.27 generates byte-identical Java for these actions.
Cause
- The parameter's type resolution treats any bare qualified name as an entity.
- A comment in
mdl/executor/cmd_javaactions.go says a function resolveCodeActionParamType handles this case. No such function exists anywhere in the repo.
Expected
- A bare qualified name that resolves to an enumeration is stored as an enumeration type. This applies to names in the project and to names created earlier in the same script.
- A name that resolves to neither an entity nor an enumeration is refused at
check and at exec.
- The same applies to the return type and to JavaScript action parameters.
- Microflow and nanoflow parameters should be checked for the same ambiguity.
- The stale comment is removed, or made true.
Verification
On a fresh 11.14 app (mxcli new X --version 11.14.0):
- with the fix,
mxcli docker check reports 0 errors;
- with a pre-fix binary as the control, it reports CE1613.
Symptom
A Java action parameter typed with a bare enumeration name, without the
enumkeyword, is stored as an entity type:checkandexecare both clean. mxbuild then reports:Writing the type with the keyword works:
C: enum MyFirstModule.Color.This was found while making
create java actiongenerate the same.javafile as mxbuild (#934) and measured on a fresh Mendix 11.14 app. 10.24.27 generates byte-identical Java for these actions.Cause
mdl/executor/cmd_javaactions.gosays a functionresolveCodeActionParamTypehandles this case. No such function exists anywhere in the repo.Expected
checkand atexec.Verification
On a fresh 11.14 app (
mxcli new X --version 11.14.0):mxcli docker checkreports 0 errors;