Skip to content
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

Check for tasty error in template trees. #22867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lidaisy
Copy link
Contributor

@lidaisy lidaisy commented Mar 25, 2025

No description provided.

Check for tasty error in Template trees.
@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 !

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.

3 participants