Skip to content

Check for tasty error in template trees. #22867

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
merged 1 commit into from
Apr 14, 2025

Conversation

lidaisy
Copy link
Contributor

@lidaisy lidaisy commented Mar 25, 2025

No description provided.

@lidaisy lidaisy force-pushed the error-in-template-body branch from 15a44fb to fe86aee Compare March 26, 2025 02:55
@olhotak olhotak marked this pull request as ready for review April 1, 2025 12:09
Copy link
Contributor

@olhotak olhotak left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

@@ -654,6 +668,7 @@ object Semantic:
val methodType = atPhaseBeforeTransforms { meth.info.stripPoly }
var allArgsHot = true
val allParamTypes = methodType.paramInfoss.flatten.map(_.repeatedToSingle)
assert(allParamTypes.size == args.size)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make this an Internal Error instead of an assertion.

@@ -43,6 +46,7 @@ object Util:
case Apply(fn, args) =>
val argTps = fn.tpe.widen match
case mt: MethodType => mt.paramInfos
assert(args.size == argTps.size)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, Internal Error.

@olhotak olhotak requested a review from liufengyun April 2, 2025 14:58
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @lidaisy !

@lidaisy lidaisy force-pushed the error-in-template-body branch from fe86aee to ccd9c22 Compare April 13, 2025 02:03
@tgodzik
Copy link
Contributor

tgodzik commented Apr 14, 2025

@liufengyun @olhotak Can we merge this?

@olhotak
Copy link
Contributor

olhotak commented Apr 14, 2025

@liufengyun @olhotak Can we merge this?

Still waiting for a minor tweak. Please don't merge yet.

@lidaisy lidaisy force-pushed the error-in-template-body branch from ccd9c22 to 884436f Compare April 14, 2025 16:08
@olhotak olhotak enabled auto-merge April 14, 2025 16:26
@olhotak
Copy link
Contributor

olhotak commented Apr 14, 2025

@tgodzik This is now ready to be merged, but CI failed seemingly due to a flaky test. Need to re-run CI.

@olhotak olhotak merged commit 952c334 into scala:main Apr 14, 2025
25 of 26 checks passed
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.

4 participants