Skip to content

Can use Applied HK type in term position #10681

Closed
@agluszak

Description

@agluszak

Minimized code

type Test1[A] = String
val test1 = Test1[Nothing]
type Test2 = [A] =>> String
val test2 = Test2[Nothing]
type Test3 = String
val test3 = Test3

Output

scala> type Test1[A] = String
// defined alias type Test1[A] = String

scala> val test1 = Test1[Nothing]
val test1: String = ""

scala> type Test2 = [A] =>> String
// defined alias type Test2[A] = String

scala> val test2 = Test2[Nothing]
val test2: String = ""

scala> type Test3 = String
// defined alias type Test3 = String

scala> val test3 = Test3
1 |val test3 = Test3
  |            ^^^^^
  |            Not found: Test3

Expectation

I would expect all three of them to behave the same way

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions