File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ object NameOps {
13
13
object compactify {
14
14
lazy val md5 : MessageDigest = MessageDigest .getInstance(" MD5" )
15
15
16
+ final val CLASSFILE_NAME_CHAR_LIMIT = 240
17
+
16
18
/** COMPACTIFY
17
19
*
18
20
* The hashed name has the form (prefix + marker + md5 + marker + suffix), where
@@ -28,8 +30,8 @@ object NameOps {
28
30
def apply (s : String ): String = {
29
31
val marker = " $$$$"
30
32
31
- val charLimit : Int = 240
32
- val MaxNameLength = (charLimit - 6 ) min 2 * (charLimit - 6 - 2 * marker.length - 32 )
33
+ val MaxNameLength = ( CLASSFILE_NAME_CHAR_LIMIT - 6 ) min
34
+ 2 * (CLASSFILE_NAME_CHAR_LIMIT - 6 - 2 * marker.length - 32 )
33
35
34
36
def toMD5 (s : String , edge : Int ): String = {
35
37
val prefix = s take edge
You can’t perform that action at this time.
0 commit comments