summary refs log tree commit diff stats
path: root/tests/specialops
Commit message (Collapse)AuthorAgeFilesLines
* make expressions opt in to symchoices (#22716)metagn2023-09-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* stdlib tests now check refc too (#21664)ringabout2023-04-211-1/+1
| | | | | | | | | | | * stdlib tests now check refc too * typo * fixes line numbers * disable cpp * do not touch
* closes #1072; add a test case (#21396)ringabout2023-02-191-0/+10
|
* fix bugs with dot & call operators [backport] (#20931)metagn2022-11-282-0/+98
| | | | | | | | | | | | | | | | | | | * better error messages for dot operators [backport] fixes #13063 * also fixes #7777 * fix #6981 and #9831 too * fix * minor improvement * sus test fixes * make test multiplatform lol * fix nimsuggest test, extra improvements
* tests and docs for call operator (#16980)hlaaftana2021-02-093-0/+91
| | | | | | | * tests and docs for call operator * fix leftover * add extra dot test
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+3
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* dotops: add a simple object delegation testAndreas Rumpf2017-12-011-1/+23
|
* make tests green againAraq2017-11-291-14/+14
|
* Remove expr/stmt (#5857)Arne Döring2017-07-251-2/+1
|
* the delegator pragma becomes a set of dot operatorsZahary Karadjov2014-02-151-0/+66