1
0
forked from GitHub/gf-core

handle pre when it is in the arguments of a Predef function

This commit is contained in:
krangelov
2021-12-19 10:43:06 +01:00
parent b266c55f8a
commit 275f8f37ce
3 changed files with 59 additions and 23 deletions

View File

@@ -35,3 +35,13 @@ cc "x"++ALL_CAPIT++"y"
cc "a"+"b"
cc <\x->x+"b" : Str -> Str>
cc eqInt (length ("a"+"b")) 2
cc take 10 ("aa"++BIND++"bb")
cc take 10 ("aa"++CAPIT++BIND++"bb")
cc take 10 ("aa"++BIND++CAPIT++"bb")
cc take 10 ("aa"++ALL_CAPIT++BIND++"bb")
cc take 10 ("aa"++BIND++ALL_CAPIT++"bb")
cc take 10 ("aa"++nonExist++"bb")
cc take 10 (pre {"b"=>"B"; _=>"X"})
cc take 10 ("aa"++pre {"b"=>"B"; _=>"X"})
cc take 10 ("aa"++pre {"b"=>"B"; _=>"X"}++"cc")
cc take 10 ("aa"++pre {"b"=>"B"; _=>"X"}++"bb")

View File

@@ -34,3 +34,13 @@ user error
"ab"
\x -> x + "b"
Predef.PTrue
"aabb"
"aaBb"
"aaBb"
"aaBB"
"aaBB"
Predef.nonExist
"X"
"aa" ++ "X"
"aa" ++ "X" ++ "cc"
"aa" ++ "B" ++ "bb"