We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13d4963 commit 4c25664Copy full SHA for 4c25664
compiler/src/dotty/tools/dotc/transform/init/Util.scala
@@ -59,7 +59,7 @@ object Util:
59
case TypeApply(fn, targs) =>
60
unapply(fn)
61
62
- case ref: RefTree if ref.tpe.widenSingleton.isInstanceOf[MethodicType] =>
+ case ref: RefTree if ref.symbol.is(Flags.Method) =>
63
Some((ref, Nil))
64
65
case _ => None
tests/init-global/pos-tasty/test-safe-value.scala
@@ -0,0 +1,7 @@
1
+package scala.collection.immutable
2
+
3
+object A { // These are a safe values, so no warning should be emitted
4
+ Node.HashCodeLength
5
+ Node.BitPartitionSize
6
+ Node.MaxDepth
7
+}
0 commit comments