Skip to content

Incorrect inferred method type argument in Scala 3 #4338

@kpodsiad

Description

@kpodsiad

Describe the bug

//> using scala "3.2.0"

//> using lib "org.typelevel::cats-core:2.8.0"

import cats.data.StateT
import cats.syntax.all._
import cats.implicits._
import cats.Id

object Cats extends App {
  type IdState[A] = StateT[Id, Int, A]

  val test: IdState[Unit] =
    StateT.modify(old => old)

  test.runS(1)

}

Screenshot 2022-09-03 at 07 43 01

Expected behavior

StateT.modify has correct inferred type [Id, Int]

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

0.11.8+72-6567f1a3-SNAPSHOT

Extra context or search terms

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Scala 3Generic ticket relating to Scala 3presentation-compilerSomething relating to the presentation compilerupstream-fix-neededWaiting on a fix upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions