Skip to content

Update Scala 3 version to 3.5+ to support binary integer literals #882

Description

@rabestro

Currently, the Scala track uses scalaVersion := "3.4.2". I propose bumping the Scala 3 version to at least 3.5.x (or the latest stable release).

Motivation

While working on exercises that rely heavily on bitwise operations (such as Secret Handshake), it is highly idiomatic to use binary integer literals (e.g., 0b10000 instead of 16). It makes the code self-documenting and much easier to read.

However, attempting to use this syntax in the current environment results in a compilation error because binary literals were officially introduced in Scala 3.5.

Error message:

Binary literals require Scala 2.13.13 or Scala 3.5
end of statement expected but identifier found

Impact

Updating the version will allow students and mentors to write cleaner, more expressive code without relying on decimal-to-binary mental conversions or hexadecimals.

Metadata

Metadata

Assignees

标签

dependencies拉取请求 that update a dependency filex:action/improveImprove existing functionality/content

项目

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions