Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Explain no expansion of ContextFunction0 #23844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
odersky merged 1 commit into scala:main from som-snytt:issue/21321-CF0
Sep 10, 2025
Merged

Conversation

Copy link
Contributor

@som-snytt som-snytt commented Aug 30, 2025

Fixes #21321

Just an edge case.

I tried emitting TypeMismatch with addenda, but it didn't render, so that was too much hassle just to add a string.

This is the existing notice; it doesn't indicate why it doesn't work.

2 |val v1: scala.ContextFunction0[String] = "x" // error
 | ^^^
 | Found: ("x" : String)
 | Required: () ?=> String

He-Pin reacted with thumbs up emoji
@odersky odersky merged commit c4c48e3 into scala:main Sep 10, 2025
44 checks passed
@som-snytt som-snytt deleted the issue/21321-CF0 branch September 10, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@odersky odersky odersky approved these changes

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

(minor) usage of scala.ContextFunction0 should produce "context function types require at least one parameter" error

AltStyle によって変換されたページ (->オリジナル) /