Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sbt.internal.util.ManagedLogger

import org.scalajs.jsenv.nodejs.NodeJSEnv

val usedScalaCompiler = "3.8.1"
val usedScalaCompiler = "3.8.3"
val usedTastyRelease = usedScalaCompiler
val scala2Version = "2.13.18"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,18 @@ private[tasties] class TreeUnpickler private (
private def readAnnotation()(using SourceFile): Annotation =
val end = reader.readEnd()
skipTree() // skip the typeref to the annotation class; we only use the tree
val tree = readTerm
Annotation(tree)

if isCompactAnnotTypeTag(reader.nextByte) then
// #464 Apparently we can have CompactAnnotations anyway?
Annotation.fromAnnotTypeAndArgs(readTrueType(), Nil)
else Annotation(readTerm)
end readAnnotation

/** Can `tag` start a type argument of a CompactAnnotation? */
private def isCompactAnnotTypeTag(tag: Int): Boolean = tag match
case APPLIEDtype | SHAREDtype | TYPEREF | TYPEREFdirect | TYPEREFsymbol | TYPEREFin => true
case _ => false

/** Performs the read action as if SHARED tags were transparent:
* - follows the SHARED tags to the term or type that is shared
* - reads the shared term or type with {@code read} action
Expand Down
Loading