Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Untyped action usage bound to an invocation does not resolve the invoked action's parameters

Cerrado
#843 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
compilers

Línea de trabajo

Start by reproducing the issue with the sysml -action I::caller inherited.sysml command and compare it with the explicitly typed run : Base form. Trace member lookup and inferred typing for an action usage whose value is an invocation expression. Done means run.r resolves without an explicit type and the model executes with result = 7.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

An action usage whose value is an invocation expression, written without an explicit type, does not expose the invoked action's parameters to member access. Validation reports unresolved member for a parameter that the invoked definition declares, and the model cannot be executed.

Reproduction

package I {
  private import ScalarValues::*;
  action def Base {
    in x : Integer = 3;
    in z : Integer = x * 2;
    out r : Integer;
    first start;
    then assign x := 10;
    then assign r := z;
    then done;
  }
  action caller {
    out attribute result : Integer;
    first start;
    then action run = Base(x = 3, z = 7);
    then action keep { assign result := run.r; }
    then done;
  }
}
$ sysml -action I::caller inherited.sysml
inherited.sysml:17:45: error: unresolved member: r
    then action keep { assign result := run.r; }
                                            ^
sysml: inherited.sysml did not analyse cleanly; no check was made

The result is the same on develop at 3d45ca6fb.

Expected

run is the result of Base(x = 3, z = 7), which is typed by Base, so run.r resolves to Base::r and the model runs with result = 7.

Writing the type explicitly, then action run : Base = Base(x = 3, z = 7);, resolves run.r and runs with result = run.r = run.z = 7. That suggests the member lookup on run does not use the type implied by its invocation value.

Lenguaje dominante
Go
Estrellas
42
Forks
13
Merge medio
16 h 17 min
PR fusionados (30 d)
868

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Open-MBEE/OpenSysML

Todos los issues de Open-MBEE/OpenSysML

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.