Skip to content

parser should flag use of _lxxf suffix on built-in functions in sampling statements #2595

@mitzimorris

Description

@mitzimorris

Summary:

currently parser allows: foo ~ normal_lpdf(0, 1); due to suffix stripping logic; should flag as incorrect.

Description:

parser has suffix stripping logic for user-defined probability functions, but here this applies to built-in probability distributions as well.

Reproducible Steps:

this shouldn't compile but it does:

data {
  int<lower=0> N;
}
parameters {
  vector[N] foo;
}
model {
  foo ~ normal_lpdf(0, 1);
}

Current Output:

currently OK; should get flagged as error.

Expected Output:

Describe what you expect the output to be. Knowing the correct behavior is also very useful.

Additional Information:

Provide any additional information here.

Current Version:

v2.18.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions