Skip to content

improve error msg when delcaration is made after assignment #2523

@yizhang-yiz

Description

@yizhang-yiz

Summary:

When declare after assignment the msg is not informative.

Description:

When declare after assignment the error msg is
variable xxx does not exitst
where xxx is the type name of the declared variable. This is not informative to beginners.

Reproducible Steps:

make a model with the following transformed data

transformed data {
  real x;
  x = 3.0;
  real z;
  z = 3.0
}

Current Output:

SYNTAX ERROR, MESSAGE(S) FROM PARSER:

variable "real" does not exist.

Expected Output:

More informative information on the order of declaration & assignment.

Current Version:

v2.17.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions