Skip to content

Infix types doesn't work correctly with anonymous givens #10927

@ghost

Description

infix types fails with Double definition compile error while using with givens.

  trait Transition[From, To]

  infix type ==>[From, To] = Transition[From, To]

  type A = A.type
  object A

  type B = B.type
  object B

  type C = C.type
  object C

  // Compiles
  given (A ==> B) = ???

  // Compile error
  given (A ==> C) = ???

  // Compiles
  given ==>[A, C] = ??? 

Error:

Double definition:
final lazy given val given_A: 
  Transition[A, B] in object bug at line 19 and
final lazy given val given_A: 
  Transition[A, C] in object bug at line 22

  given (A ==> C) = ???

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions