Skip to content

Refactor split quote symbol mapping #18104

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

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jun 30, 2023

Now, the mapping is a SeqMap[Symbol, Symbol] to convey its ordering and the Bind is created when we are creating the tree of the quote pattern.

Follow up of the refactoring in #17956

case tp => mapOver(tp)
}
}
val replaceBindings = new ReplaceBindings
val patType = defn.tupleType(splices.tpes.map(tpe => replaceBindings(tpe.widen)))

val typeBindingsTuple = tpd.hkNestedPairsTypeTree(typeBindings.values.toList)
val typeBinds = bindSymMapping.values.toList.map(sym =>
Copy link
Member

Choose a reason for hiding this comment

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

Putting the toList after the map would be more efficient I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the toList after the map

Now, the mapping is a `SeqMap[Symbol, Symbol]` to convey its ordering
and the `Bind` is created when we are creating the tree of the quote
pattern.
@nicolasstucki nicolasstucki force-pushed the fix-quote-type-variable-bounds-2 branch from 1560388 to 9044c4e Compare June 30, 2023 09:24
@nicolasstucki nicolasstucki enabled auto-merge June 30, 2023 09:24
@nicolasstucki nicolasstucki merged commit 8748dea into scala:main Jun 30, 2023
@nicolasstucki nicolasstucki deleted the fix-quote-type-variable-bounds-2 branch June 30, 2023 10:43
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.

2 participants