Skip to content

ensure-distinct-lines throws spurious errors when syntax from different files is spliced together #1826

@dbp

Description

@dbp

Currently, this check:

fun ensure-distinct-lines(loc :: Loc, prev-is-template :: Boolean, stmts :: List<A.Expr>):

Only takes lines, but not files, into account.

But, it is not relatively straightforward to take syntax from different files and combine them into single files and run them. However, if you happen to have two expressions on the same line in the separate files, this will result in a well-formedness error.

This function should presumably be taking the first argument to srcloc into account when doing the comparison, as if those are different, then the two expressions should not be considered on the same line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions