Skip to content

Conversation

@som-snytt
Copy link
Contributor

After typer, add error diagnostics to a special LateMismatchedImplicit, so that inlining can add the text to the "missing arg" message. (It piggy-backs on the otherwise unused "location" string. The existing English grammar works out okay.) This limits the "surface area" of this channel.

The current reference does not suggest that error works only at typer phase:

The error method is used to produce user-defined compile errors during inline expansion.

The reference is liberal about how the user text is represented:

If an inline expansion results in a call error(msgStr) the compiler produces an error message containing the given msgStr.

This commit is more conservative than nicolasstucki's fix for macro errors, since existing clients can ignore the special MismatchedImplicit type, and msg formatting is unchanged.

Fixes #15788

@som-snytt som-snytt force-pushed the issue/15788-compiletime-error-inlined branch from 0c6ad6f to 226cd1d Compare February 10, 2025 01:52
@som-snytt som-snytt marked this pull request as ready for review February 10, 2025 01:58
@som-snytt som-snytt force-pushed the issue/15788-compiletime-error-inlined branch from 226cd1d to e6cd09f Compare February 13, 2025 03:53
@Gedochao Gedochao requested review from dwijnand and jchyb February 14, 2025 07:24
@som-snytt som-snytt force-pushed the issue/15788-compiletime-error-inlined branch from e6cd09f to 3b695d6 Compare November 25, 2025 17:07
@som-snytt som-snytt marked this pull request as draft November 25, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent summonInline behavior

2 participants