Skip to content

typecheck/failure/duplicateFields.dhall spec test fails in parsing step instead in type checking one #772

Open
@jneira

Description

@jneira

Hi, the spec tes case https://github.com/dhall-lang/dhall-lang/blob/master/tests/typecheck/failure/duplicateFields.dhall fails when parsing instead when typechecking:

D:\dhall-lang\tests\typecheck\failure>dhall format < duplicateFields.dhall

Error: Invalid input

(stdin):1:16:
  |
1 | { a = 1, a = 2 }
  |                ^
duplicate field: a

As parsing is needed to make the type check, there is no way to test it properly.
If the standard forbids the parsing of duplicated fields the test should be moved to tests/parser/failure (and test code should be changed), otherwise the haskell impl should be changed to allow parse the expression.
AFAIU the grammar spec doesn't disallow duplicate fields in records.

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