Skip to content

Incorrect type checking for truncations #2715

@VMatthijs

Description

@VMatthijs

Summary:

The type checking for truncations in stanc2 does not always work.

Description:

Some models where the truncation bounds should be integers, get accepted even if the bounds are real.

Reproducible Steps:

Try to compile the model

model { 1 ~ bernoulli(0.2) T[0, 1.1]; }

Current Output:

This should throw a type checking error, as the 1.1 should be of type int.

Expected Output:

Instead, it compiles just fine.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions