Skip to content

[Scala3] Move OpaqueTypeSpec and DirectionSpec#5399

Open
adkian-sifive wants to merge 1 commit into
mainfrom
adkian-sifive/scala3-opaquetypespec
Open

[Scala3] Move OpaqueTypeSpec and DirectionSpec#5399
adkian-sifive wants to merge 1 commit into
mainfrom
adkian-sifive/scala3-opaquetypespec

Conversation

@adkian-sifive
Copy link
Copy Markdown
Member

Summary

OpaqueTypeSpec was hitting two errors in Scala 3:

class MaybeBoxed needs to be abstract, since:
it has 3 unimplemented members.
  // Members declared in chiselTests.experimental.OpaqueTypeSpec$.MaybeBoxed
  def boxed: Boolean = ???
  def underlying: T = ???
  
  // Members declared in chisel3.Record
  def elements: scala.collection.immutable.SeqMap[String, chisel3.Data] = ???

and

def underlying = elements.head._2
                 ^^^^^^^^^^^^^^^^
          Found:    chisel3.Data
          Required: T
          where:    T is a type in class Boxed with bounds <: chisel3.Data

Fix both and cross run DirectionSpec

Release Notes

OpaqueTypeSpec and DirectionSpec now supported in Scala 3

@adkian-sifive adkian-sifive added the Scala 3 Changes related to upgrading to Scala 3 label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scala 3 Changes related to upgrading to Scala 3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant