summary refs log tree commit diff stats
path: root/tests/lookups
Commit message (Collapse)AuthorAgeFilesLines
* make expressions opt in to symchoices (#22716)metagn2023-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refs #22605 Sym choice nodes are now only allowed to pass through semchecking if contexts ask for them to (with `efAllowSymChoice`). Otherwise they are resolved or treated as ambiguous. The contexts that can receive symchoices in this PR are: * Call operands and addresses and emulations of such, which will subject them to overload resolution which will resolve them or fail. * Type conversion operands only for routine symchoices for type disambiguation syntax (like `(proc (x: int): int)(foo)`), which will resolve them or fail. * Proc parameter default values both at the declaration and during generic instantiation, which undergo type narrowing and so will resolve them or fail. This means unless these contexts mess up sym choice nodes should never leave the semchecking stage. This serves as a blueprint for future improvements to intermediate symbol resolution. Some tangential changes are also in this PR: 1. The `AmbiguousEnum` hint is removed, it was always disabled by default and since #22606 it only started getting emitted after the symchoice was soundly resolved. 2. Proc setter syntax (`a.b = c` becoming `` `b=`(a, c) ``) used to fully type check the RHS before passing the transformed call node to proc overloading. Now it just passes the original node directly so proc overloading can deal with its typechecking.
* resolve unambiguous enum symchoices from local scope, error on rest (#22606)metagn2023-09-031-5/+2
| | | | | | | | | | | | | | | | fixes #22598, properly fixes #21887 and fixes test case issue number When an enum field sym choice has to choose a type, check if its name is ambiguous in the local scope, then check if the first symbol found in the local scope is the first symbol in the sym choice. If so, choose that symbol. Otherwise, give an ambiguous identifier error. The dependence on the local scope implies this will always give ambiguity errors for unpicked enum symchoices from generics and templates and macros from other scopes. We can change `not isAmbiguous(...) and foundSym == first` to `not (isAmbiguous(...) and foundSym == first)` to make it so they never give ambiguity errors, and always pick the first symbol in the symchoice. I can do this if this is preferred, but no code from CI seems affected.
* strictly typecheck expressions in bracketed `emit` (#22074)metagn2023-06-131-0/+12
| | | | | * strictly typecheck expressions in bracketed `emit` * use nim check in test
* retain forced open undeclared ident information (#22019)metagn2023-06-071-0/+17
|
* some test cleanups & category reorganization (#22010)metagn2023-06-0616-0/+309
| | | | | | | | | | | | | | | | | * clean up some test categories * mention exact slice issue * magics into system * move trangechecks into overflow * move tmemory to system * try fix CI * try fix CI * final CI fix
* new .redefine pragma for templates, warn on redefinition without it (#20211)metagn2022-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test CI for template redefinitions * adapt asyncmacro * fix quote * fix again * try something else * revert * fix ioselectors_select, disable packages CI * adapt more tests & simplify * more * more * more * rename to redefine, warn on implicit redefinition * basic documentation [skip ci] * Update compiler/lineinfos.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+1
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* implement the 'bind' statement for generics, it was an oversight that this ↵Andreas Rumpf2020-06-071-0/+17
| | | | was never implemented (#14584)
* Allow void macro result (#11286)Arne Döring2019-05-211-1/+1
| | | | | * allow void macro result * add test for void macro result type
* updated tests to be executedArne Döring2018-11-231-1/+7
|
* delete old cruftArne Döring2018-11-231-4/+0
|
* fixes #4353Andreas Rumpf2016-08-041-0/+4
|
* fixes #4555Andreas Rumpf2016-08-021-0/+17
|
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-042-3/+3
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* make tests greenAraq2014-08-311-1/+1
|
* Changed tests and tools to use 'discard' statements instead of 'nil' for ↵Clay Sweetser2014-02-151-7/+7
| | | | empty blocks.
* tester support html generationAraq2014-01-141-0/+29
|
* new tester; all tests categorizedAraq2014-01-131-0/+17