-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
added HashTableBuilder.rootNode to white list #19943
Conversation
@@ -1683,10 +1683,12 @@ class Objects: | |||
end if | |||
|
|||
// class body | |||
val whiteList = Set("scala.collection.immutable.Vector.emptyIterator") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a Definition here (from dotty.tools.dotc.core.Definitions
) instead of a plain String, unless there is some reason not to.
Could you also please add description & problem this PR fixes, as there is no issue attached? |
This is a step towards fixing #18882 . |
val sym = vdef.symbol | ||
var res = if (whiteList.contains(sym)) Bottom else eval(vdef.rhs, thisV, klass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be a val now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
It turns out that adding |
@liufengyun Could you take a look, please? |
@@ -1683,10 +1685,11 @@ class Objects: | |||
end if | |||
|
|||
// class body | |||
val whiteList = Set(HashSetBuilder_rootNode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move it to be a field of the class Objects
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering what if we add the following fields to the whitelist:
scala.collection.immutable.SetNode.EmptySetNode
https://github.com/scala/scala/blob/2.13.x/src/library/scala/collection/immutable/HashSet.scala#L384scala.collection.immutable.HashSet.EmptySet
https://github.com/scala/scala/blob/2.13.x/src/library/scala/collection/immutable/HashSet.scala#L1934
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.