avoid deprecated syntax

This commit is contained in:
Mark Canlas 2023-12-31 19:03:12 -05:00
parent ee87a131ea
commit fba3e7e44b
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ case class Subroutine(name: String, fragment: AsmFragment, jumpRegistry: ListSet
def toAsm: String =
name + ":" + "\n" + fragment.toAsm
case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends TopLevelAsmDocumentFragment:
case class DefinitionGroup(comment: String, xs: List[Definition[?]]) extends TopLevelAsmDocumentFragment:
def toAsm: String =
val groupCommentLine =
"; " + comment
@ -62,7 +62,7 @@ case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends Top
.mkString("\n")
class DefinitionGroupContext:
private val xs: ListBuffer[Definition[_]] =
private val xs: ListBuffer[Definition[?]] =
ListBuffer()
def push[A](x: A)(using ev: NamedResource[A]): Unit =
@ -85,7 +85,7 @@ case class Definition[A](name: String, x: A, comment: Option[String])(using ev:
object Definition:
given namedResourceForDefinition[A]: NamedResource[Definition[A]] =
new NamedResource[Definition[A]]:
def toDefinitions(x: Definition[A]): List[Definition[_]] =
def toDefinitions(x: Definition[A]): List[Definition[?]] =
List(x)
def apply[A: DefinitionValue](name: String, x: A): Definition[A] =

View File

@ -6,4 +6,4 @@ trait NamedResource[A]:
* A `Definable` can emit multiple definitions. Usually in the case of `word`s being split across two
* byte-definitions
*/
def toDefinitions(x: A): List[Definition[_]]
def toDefinitions(x: A): List[Definition[?]]