mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 04:33:45 +03:00
Refine test a bit
This commit is contained in:
parent
f50034a050
commit
53fe889b28
@ -22,9 +22,10 @@ record Other a where
|
||||
fieldA : a
|
||||
fieldB : b
|
||||
|
||||
myDog_notWorking0 : record MkDog {name = "Sam"} -- Not all fields are covered
|
||||
|
||||
myDog_notWorking : record MkDog {name = "Sam"} -- Not all fields are covered
|
||||
|
||||
myDog_notWorking1 : record MkDog {age = 3, name1 = "Sam"} -- No constructor with name `MkDog`
|
||||
-- has field `name1`
|
||||
myDog_notWorking2 : record MkDog
|
||||
{ age = 4
|
||||
, age = 2
|
||||
|
@ -1,18 +1,28 @@
|
||||
1/1: Building Fld (Fld.idr)
|
||||
Error: While processing type of myDog_notWorking. Field not covered age.
|
||||
Error: While processing type of myDog_notWorking0. Field not covered age.
|
||||
|
||||
Fld.idr:26:20--26:47
|
||||
Fld.idr:25:21--25:48
|
||||
|
|
||||
26 | myDog_notWorking : record MkDog {name = "Sam"} -- Not all fields are covered
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25 | myDog_notWorking0 : record MkDog {name = "Sam"} -- Not all fields are covered
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Error: While processing type of myDog_notWorking1. No constructor satisfies provided fields.
|
||||
|
||||
Fld.idr:27:21--27:58
|
||||
|
|
||||
27 | myDog_notWorking1 : record MkDog {age = 3, name1 = "Sam"} -- No constructor with name `MkDog`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Error: While processing type of myDog_notWorking2. Duplicate fields.
|
||||
|
||||
Fld.idr:28:21--32:38
|
||||
28 | myDog_notWorking2 : record MkDog
|
||||
29 | { age = 4
|
||||
30 | , age = 2
|
||||
31 | , weight = 12
|
||||
32 | , name = "Sam" } -- Duplicate names
|
||||
Fld.idr:29:21--33:38
|
||||
29 | myDog_notWorking2 : record MkDog
|
||||
30 | { age = 4
|
||||
31 | , age = 2
|
||||
32 | , weight = 12
|
||||
33 | , name = "Sam" } -- Duplicate names
|
||||
|
||||
Fld> Fld.myDog : OrdinaryDog
|
||||
Fld> Fld.mySuperDog : SuperDog
|
||||
Fld> Fld.other : Other String
|
||||
Fld> Bye for now!
|
||||
|
@ -1 +1,4 @@
|
||||
:t myDog
|
||||
:t mySuperDog
|
||||
:t other
|
||||
:q
|
||||
|
Loading…
Reference in New Issue
Block a user