Commit graph

5 commits

Author SHA1 Message Date
mlugg
16481c8ef3
cases: update to new "called from here" notes 2025-05-16 13:29:55 +01:00
mlugg
e9bd2d45d4
Sema: rewrite semantic analysis of function calls
This rewrite improves some error messages, hugely simplifies the logic,
and fixes several bugs. One of these bugs is technically a new rule
which Andrew and I agreed on: if a parameter has a comptime-only type
but is not declared `comptime`, then the corresponding call argument
should not be *evaluated* at comptime; only resolved. Implementing this
required changing how function types work a little, which in turn
required allowing a new kind of function coercion for some generic use
cases: function coercions are now allowed to implicitly *remove*
`comptime` annotations from parameters with comptime-only types. This is
okay because removing the annotation affects only the call site.

Resolves: #22262
2025-01-09 06:46:47 +00:00
mlugg
21fa187abc
test: update cases to silence 'var is never mutated' errors 2023-11-19 09:56:51 +00:00
Jacob Young
7a251c4cb8 Sema: revert reference trace changes that are no longer needed 2023-08-28 17:43:37 -04:00
Veikka Tuominen
81443fcde8 Sema: add error for recursive inline call
Closes #12973
2022-12-26 16:36:30 +02:00