Skip to content

Commit

Permalink
Backport "Fail early & more clearly on shaded-broken classfiles" to L…
Browse files Browse the repository at this point in the history
…TS (#22083)

Backports #21262 to the 3.3.5.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur authored Dec 3, 2024
2 parents 33ad399 + 9d9664f commit 653abda
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,10 @@ class ClassfileParser(
// attribute isn't, this classfile is a compilation artifact.
return Some(NoEmbedded)

if (scan(tpnme.ScalaSignatureATTR) && scan(tpnme.RuntimeVisibleAnnotationATTR)) {
if (scan(tpnme.ScalaSignatureATTR)) {
if !scan(tpnme.RuntimeVisibleAnnotationATTR) then
report.error(em"No RuntimeVisibleAnnotations in classfile with ScalaSignature attribute: ${classRoot.fullName}")
return None
val attrLen = in.nextInt
val nAnnots = in.nextChar
var i = 0
Expand Down

0 comments on commit 653abda

Please sign in to comment.