Community build bug found in https://github.com/vladkopanev/cats-saga Based on [Open Community Build #2371](https://scala3.westeurope.cloudapp.azure.com/job/buildCommunityProject/2371/) Part of https://github.com/lampepfl/dotty/issues/15647 regressions tracker ## Compiler version All Scala 3 versions Compiles with Scala 2 (2.13.8) ## Minimized code <!-- This code should be self-contained, compilable (with possible failures) and as small as possible. Ideally, we should be able to just copy this code in a file and run `scalac` (and maybe `scala`) to reproduce the issue. --> ```Scala class Foo{ def bar[T](fn: () => T): T = ??? } object Test { val x = new Foo x bar(() => "hello") // is fine x bar[String](() => "world") // does not compile } ``` ## Output ```scala [error] ./test.scala:8:8: expression expected but '[' found [error] x bar[String](() => "hello") [error] ``` ## Expectation Should compile