Skip to content
Draft
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
5 changes: 4 additions & 1 deletion repl/src/dotty/tools/repl/ReplDirectives.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ private[repl] object ReplDirectives:

def toolkitCoordinates(coords: String): Option[List[String]] =
val flavorAndVersion = coords.split(":", -1).toList match
case version :: Nil if version.nonEmpty => Some((ScalaToolkit.alias, version))
// e.g. //> using toolkit typelevel would otherwise be treated as version `typelevel`
// and fail during resolution with a cryptic error, so we reject it early
case version :: Nil if version.nonEmpty && !toolkitsByFlavor.keySet.contains(version) =>
Some((ScalaToolkit.alias, version))
case flavor :: version :: Nil if flavor.nonEmpty && version.nonEmpty => Some((flavor, version))
case _ => None
flavorAndVersion.map: (flavor, rawVersion) =>
Expand Down
Loading