@@ -47,21 +47,24 @@ object Modifier:
4747
4848 given evPortVarConstructor [
4949 T <: DFType .Supported ,
50+ OT <: DFTypeAny ,
5051 A ,
5152 C ,
5253 I ,
5354 P ,
55+ SC <: DFC .Scope ,
56+ DT <: DomainType ,
5457 M <: Modifier [A , C , I , P ]
5558 ](using
56- tc : DFType .TC [ T ],
59+ tc : DFType .TC . Aux [ T , OT ],
5760 checkLocal : AssertGiven [DFC .Scope .Local , " Port/Variable declarations cannot be global" ],
58- ck : DFC . Scope ,
59- dt : DomainType
61+ ck : SC ,
62+ dt : DT
6063 ): ExactOp2Aux [" <>" , DFC , Any , T , M , DFVal [
61- tc. Type ,
62- Modifier [A & ck. type & dt. type , C , I , P ]
64+ OT ,
65+ Modifier [A & SC & DT , C , I , P ]
6366 ]] = new ExactOp2 [" <>" , DFC , Any , T , M ]:
64- type Out = DFVal [tc. Type , Modifier [A & ck. type & dt. type , C , I , P ]]
67+ type Out = DFVal [OT , Modifier [A & SC & DT , C , I , P ]]
6568 def apply (t : T , modifier : M )(using DFC ): Out = trydf {
6669 if (modifier.value.isPort)
6770 dfc.owner.asIR match
@@ -70,7 +73,7 @@ object Modifier:
7073 throw new IllegalArgumentException (
7174 " Ports can only be directly owned by a design, a domain or an interface."
7275 )
73- DFVal .Dcl (tc(t), modifier.asInstanceOf [Modifier [A & ck. type & dt. type , C , I , P ]])
76+ DFVal .Dcl (tc(t), modifier.asInstanceOf [Modifier [A & SC & DT , C , I , P ]])
7477 }(using dfc, CTName (" Port/Variable constructor" ))
7578 end evPortVarConstructor
7679end Modifier
0 commit comments