mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 06:52:19 +03:00
Add two cases to the record projection test.
This commit is contained in:
parent
ba89bbcc0d
commit
9652179990
@ -75,3 +75,14 @@ rect =
|
||||
-- user-defined projections work, too (should they?)
|
||||
(.squared) : Double -> Double
|
||||
(.squared) x = x * x
|
||||
|
||||
|
||||
-- #649: Forced patterns remain unaffected by postfix projections.
|
||||
test649 : (x, y : Bool) -> x = y -> Bool
|
||||
test649 .(x) x Refl = x
|
||||
|
||||
|
||||
-- #441: Locals do not shadow record projections.
|
||||
test441 : (Point -> Double) -> (Point -> Double) -> Point -> Double
|
||||
test441 x y pt = pt.x + pt.y
|
||||
-- no ambiguity errors: the locals "x" and "y" are not considered in pt.x and pt.y
|
||||
|
Loading…
Reference in New Issue
Block a user