diff options
author | Nadrieril | 2020-04-07 11:19:36 +0100 |
---|---|---|
committer | Nadrieril | 2020-04-07 11:19:36 +0100 |
commit | 092b7208ffd22f8facc7af387ac307e59208d52c (patch) | |
tree | 61030f5ee21919df96d32ff556582566e7c8ee42 /dhall/tests | |
parent | 56efd2ac39149d8652bd625fbf0679c10823b137 (diff) |
Move duplicate field checking to parser
Diffstat (limited to 'dhall/tests')
14 files changed, 41 insertions, 41 deletions
diff --git a/dhall/tests/type-inference/failure/mixedUnions.txt b/dhall/tests/type-inference/failure/mixedUnions.txt index a6ca913..2b307d0 100644 --- a/dhall/tests/type-inference/failure/mixedUnions.txt +++ b/dhall/tests/type-inference/failure/mixedUnions.txt @@ -1,6 +1,6 @@ -Type error: error: InvalidFieldType - --> <current file>:1:1 +Type error: error: InvalidVariantType + --> <current file>:1:28 | 1 | < Left : Natural | Right : Type > - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidVariantType | diff --git a/dhall/tests/type-inference/failure/recordOfKind.txt b/dhall/tests/type-inference/failure/recordOfKind.txt index 7dcbe4f..9a243c3 100644 --- a/dhall/tests/type-inference/failure/recordOfKind.txt +++ b/dhall/tests/type-inference/failure/recordOfKind.txt @@ -1,6 +1,6 @@ Type error: error: InvalidFieldType - --> <current file>:1:1 + --> <current file>:1:7 | 1 | { a = Kind } - | ^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidFieldType | diff --git a/dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt b/dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt index fa8b153..a83bb4f 100644 --- a/dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt +++ b/dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt @@ -1,6 +1,6 @@ Type error: error: InvalidFieldType - --> <current file>:1:1 + --> <current file>:1:17 | 1 | { x = Type, y = Kind } - | ^^^^^^^^^^^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidFieldType | diff --git a/dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt index 05c3eed..7b35481 100644 --- a/dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt +++ b/dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt @@ -1,6 +1,6 @@ -Type error: error: ProjectionDuplicateField - --> <current file>:1:1 + --> 1:11 | -1 | { x = 1 }.{ x, x } - | ^^^^^^^^^^^^^^^^^^ ProjectionDuplicateField +1 | { x = 1 }.{ x, x }␊ + | ^------^ | + = Duplicate field in projection diff --git a/dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt b/dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt index d8bec44..aced8a9 100644 --- a/dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt +++ b/dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt @@ -1,6 +1,6 @@ -Type error: error: RecordTypeDuplicateField - --> <current file>:1:1 + --> 1:3 | -1 | { x: Natural, x: Natural } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ RecordTypeDuplicateField +1 | { x: Natural, x: Natural }␊ + | ^--------------------^ | + = Duplicate field in record type diff --git a/dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt b/dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt index 81815a2..c6c274c 100644 --- a/dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt +++ b/dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt @@ -1,6 +1,6 @@ Type error: error: InvalidFieldType - --> <current file>:1:1 + --> <current file>:1:7 | 1 | { x : True } - | ^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidFieldType | diff --git a/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt index 146bf7f..6a6da80 100644 --- a/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt +++ b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt @@ -1,6 +1,6 @@ Type error: error: InvalidFieldType - --> <current file>:1:16 + --> <current file>:1:22 | 1 | { x = Bool } ⫽ { x = Kind } - | ^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidFieldType | diff --git a/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt index 71914e1..322e7f4 100644 --- a/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt +++ b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt @@ -1,6 +1,6 @@ Type error: error: InvalidFieldType - --> <current file>:1:15 + --> <current file>:1:21 | 1 | { x = {=} } ⫽ { x = Kind } - | ^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidFieldType | diff --git a/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt index 84bfe4d..9984693 100644 --- a/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt +++ b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt @@ -1,6 +1,6 @@ -Type error: error: UnionTypeDuplicateField - --> <current file>:1:1 + --> 1:2 | -1 | <x | x> - | ^^^^^^^ UnionTypeDuplicateField +1 | <x | x>␊ + | ^---^ | + = Duplicate variant in union type diff --git a/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt index eb20b12..fdf6dc0 100644 --- a/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt +++ b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt @@ -1,6 +1,6 @@ -Type error: error: UnionTypeDuplicateField - --> <current file>:1:1 + --> 1:2 | -1 | <x | x: Natural> - | ^^^^^^^^^^^^^^^^ UnionTypeDuplicateField +1 | <x | x: Natural>␊ + | ^------------^ | + = Duplicate variant in union type diff --git a/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt index 44ce7a3..ae6c845 100644 --- a/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt +++ b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt @@ -1,6 +1,6 @@ -Type error: error: InvalidFieldType - --> <current file>:1:1 +Type error: error: InvalidVariantType + --> <current file>:1:18 | 1 | < x : Bool | y : Type > - | ^^^^^^^^^^^^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidVariantType | diff --git a/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt index 01f706d..faf81a9 100644 --- a/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt +++ b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt @@ -1,6 +1,6 @@ -Type error: error: InvalidFieldType - --> <current file>:1:1 +Type error: error: InvalidVariantType + --> <current file>:1:18 | 1 | < x : Kind | y : Type > - | ^^^^^^^^^^^^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidVariantType | diff --git a/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt index 496462d..bbfb1f3 100644 --- a/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt +++ b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt @@ -1,6 +1,6 @@ -Type error: error: InvalidFieldType - --> <current file>:1:1 +Type error: error: InvalidVariantType + --> <current file>:1:18 | 1 | < x : Kind | y : Bool > - | ^^^^^^^^^^^^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidVariantType | diff --git a/dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt b/dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt index 450a3dd..cedf06e 100644 --- a/dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt +++ b/dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt @@ -1,6 +1,6 @@ -Type error: error: InvalidFieldType - --> <current file>:1:1 +Type error: error: InvalidVariantType + --> <current file>:1:7 | 1 | < x : True > - | ^^^^^^^^^^^^ InvalidFieldType + | ^^^^ InvalidVariantType | |