diff options
author | Saem Ghani <saemghani+github@gmail.com> | 2021-03-17 11:51:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 19:51:50 +0100 |
commit | 72b89eff82c54e771b6842674a4de3cbf714eae3 (patch) | |
tree | 9dc9cb41b4f07c097809dbf1566daa6f624cde4e /tests/constr/tnocompiletimefunclambda.nim | |
parent | 144e338abb33debfa6ec6abdf3a110aade779485 (diff) | |
download | Nim-72b89eff82c54e771b6842674a4de3cbf714eae3.tar.gz |
semLambda removed, semProcAux reworked (#17379)
* simplified proc-like name ident to symbol code * wip - reworking generic param sem * wip - closer to removing nkEmpty generic params * it's hacky but tests pass * slowly tweaking semProcAux to take on semLambda * fix pragma superset check proto vs current * Set the symbol owner earlier * partial progress reworking proto found bug where default values between forward and impl lead to overload resolution issues. * simplified pragma handling and callConv checks Co-authored-by: Clyybber <Clyybber@users.noreply.github.com> * partially working * cgexprs issue * It works! * comment clean-up * clean-up asserts, comments, and other bits * add isGenericParams, inline isGeneric queries * seeing if this is sufficiently consistent * can use this approach or continue it in a further PR * commentary about nullary generics and clean-ups * fixed a mistake in PNode isGenericRoutine * Some small cleanups * Small cleanup * for func lambdas ensure we use lambda pragmas * add some basic compileTime func tests * [ci skip] remove comments Co-authored-by: Clyybber <Clyybber@users.noreply.github.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
Diffstat (limited to 'tests/constr/tnocompiletimefunclambda.nim')
-rw-r--r-- | tests/constr/tnocompiletimefunclambda.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/constr/tnocompiletimefunclambda.nim b/tests/constr/tnocompiletimefunclambda.nim new file mode 100644 index 000000000..d134eea40 --- /dev/null +++ b/tests/constr/tnocompiletimefunclambda.nim @@ -0,0 +1,6 @@ +discard """ + errormsg: "request to generate code for .compileTime proc: :anonymous" +""" + +let a = func(a: varargs[int]) {.compileTime, closure.} = + discard a[0] \ No newline at end of file |