We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Mill 0.11.12 (or main branch)
import mill._ def arrayCopyCommand() = T.command { val array = Array("a", "b", "c") val hash = array.hashCode val cloned = array.clone // invokevirtual Method "[Ljava/lang/String;".clone:()Ljava/lang/Object; val clonedHash = cloned.hashCode println(s"Original hash: $hash, cloned hash: $clonedHash") }
Analysing this command will crash, because a method is not expected to be invoked on an array class:
1 targets failed methodCodeHashSignatures java.lang.AssertionError: assertion failed: JType [Ljava.lang.String; contains invalid '[' characters scala.Predef$.assert(Predef.scala:279) mill.codesig.JvmModel$JType$Cls.<init>(JvmModel.scala:178) mill.codesig.JvmModel$SymbolTable$JCls$.$anonfun$create$4(JvmModel.scala:47) mill.codesig.JvmModel$SymbolTable$Table.$anonfun$get$1(JvmModel.scala:26) scala.collection.mutable.LinkedHashMap.getOrElseUpdate(LinkedHashMap.scala:143) mill.codesig.JvmModel$SymbolTable$Table.get(JvmModel.scala:26) mill.codesig.JvmModel$SymbolTable$JCls$.apply(JvmModel.scala:48) mill.codesig.JvmModel$JType$Cls$.fromSlashed(JvmModel.scala:186) mill.codesig.LocalSummary$MyMethodVisitor.visitMethodInsn(LocalSummary.scala:275)
The text was updated successfully, but these errors were encountered:
Nice find, should be a quick fix
Sorry, something went wrong.
Fix crash in codesig analysis for method calls on arrays (#3623)
bf81800
Fixes #3616
Successfully merging a pull request may close this issue.
Mill 0.11.12 (or main branch)
Analysing this command will crash, because a method is not expected to be invoked on an array class:
The text was updated successfully, but these errors were encountered: