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 f3829d1 commit 41eb04aCopy full SHA for 41eb04a
compiler/src/dotty/tools/dotc/core/NameOps.scala
@@ -13,6 +13,8 @@ object NameOps {
13
object compactify {
14
lazy val md5: MessageDigest = MessageDigest.getInstance("MD5")
15
16
+ final val CHAR_LIMIT = 240
17
+
18
/** COMPACTIFY
19
*
20
* The hashed name has the form (prefix + marker + md5 + marker + suffix), where
@@ -28,8 +30,7 @@ object NameOps {
28
30
def apply(s: String): String = {
29
31
val marker = "$$$$"
32
- val charLimit: Int = 240
- val MaxNameLength = (charLimit - 6) min 2 * (charLimit - 6 - 2 * marker.length - 32)
33
+ val MaxNameLength = (CHAR_LIMIT - 6) min 2 * (CHAR_LIMIT - 6 - 2 * marker.length - 32)
34
35
def toMD5(s: String, edge: Int): String = {
36
val prefix = s take edge
0 commit comments