metals icon indicating copy to clipboard operation
metals copied to clipboard

Metals doesn't recognize all the new syntax under the experimental:modularity flag

Open felher opened this issue 5 months ago • 4 comments

Describe the bug

Given the following small file:

trait TypeClass:
  type Self

given Int is TypeClass

def foo[T: {Ordering, TypeClass}]: Unit = ()

Metals reports

abstract givens cannot be anonymous

for the given Int is TypeClass line and reports

illegal start of declaration

for the def foo line, even though

    scalacOptions ++= Seq(
      "-source:future",
      "-language:experimental.modularity",
    )

are set in build.sbt. It compiles and runs fine in SBT.

Expected behavior

It should not show any errors

Operating system

Linux

Editor/Extension

Nvim (nvim-metals)

Version of Metals

v1.3.5

Extra context or search terms

No response

felher avatar Sep 26 '24 10:09 felher