doc: elabissue for underapplied proj notation
This commit is contained in:
parent
a768aa0d1c
commit
b6d96dc0f4
1 changed files with 11 additions and 0 deletions
11
tests/elabissues/ProjNotation.lean
Normal file
11
tests/elabissues/ProjNotation.lean
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/- Underapplying a projection notation applies the 'this' argument to the wrong parameter.
|
||||
It should either fail or (preferably) construct an explicit lambda. -/
|
||||
|
||||
-- Char → Bool
|
||||
#check fun c => ['a', 'b'].elem c
|
||||
-- List (List Char) → Bool
|
||||
#check ['a', 'b'].elem
|
||||
-- works
|
||||
#check fun (s : String) => s.split (fun c => ['a', 'b'].elem c)
|
||||
-- doesn't work
|
||||
#check fun (s : String) => s.split (['a', 'b'].elem)
|
||||
Loading…
Add table
Reference in a new issue