1

I'm trying to define and use a type alias in Scala3 for scala.collection.immutable.Set[scala.collection.immutable.BitSet] like so:

import scala.collection.immutable.{BitSet => Set, Set => SSet}

object Main extends App {
  type Algebra = SSet[Set]

  val omega = Set(1,2,3,4,5,6)
  val empty = Set()
  val A = Algebra(omega, empty) // error: Not found: Algebra
}

I think I'm missing something very basic here.

le_me
  • 3,089
  • 3
  • 26
  • 28
  • 2
    Does this answer your question? [Creating Objects from type alias in Scala](https://stackoverflow.com/questions/26720506/creating-objects-from-type-alias-in-scala) – Kolmar Mar 14 '22 at 11:26
  • thank you! only partially, as I understand the problem now, but the suggested answers don't work in my case – le_me Mar 14 '22 at 11:59
  • 1
    `Algebra` is a type, not a value. You can't call the `apply` method on a type; because types don't have methods. – Luis Miguel Mejía Suárez Mar 14 '22 at 13:46

0 Answers0