Skip to content

Conversation

som-snytt
Copy link
Contributor

Print info at typer in example code. Could be automatic.

Note the sig test must not be at typer.

Fixes #23832

@som-snytt
Copy link
Contributor Author

As mentioned at #23121, there are other cases of clashing invented names that are not double defs because the for comprehension desugars them to locals and pattern vars.

@som-snytt som-snytt marked this pull request as ready for review August 29, 2025 14:56
@Gedochao Gedochao requested a review from noti0na1 September 1, 2025 08:26
|
| To fix this error, you need to disambiguate the two definitions. You can either:
|
| 1. Rename one of the definitions, or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the error is reported for given, the first point seems redundant to me. Can we replace it in this case?

@som-snytt som-snytt force-pushed the issue/23832-doubled-given branch from e6c9c95 to 6fe3abc Compare September 3, 2025 22:59
@som-snytt
Copy link
Contributor Author

The purpose of this extra help is to clarify that "anonymous" givens have names, albeit invented ones, and that it turns out to be necessary to name at least one of them explicitly. The example is to prompt the user as to what such a name looks like. Maybe they have never written a named given. Hopefully the example gives them enough information to prompt copilot in turn.

That is, it is not a goal of the addendum to be complete or pastable. It ought to be approximately correct.

Copy link
Member

@noti0na1 noti0na1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

"Double definition:" error for givens isn't helpful
2 participants