You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[General]: FP::Half declares its parameter N twice #99
function FP::Half(implicit N : {16, 32, 64}, N : Integer) -> Bits(N)
The parameter list declares N twice, once as an implicit {16, 32, 64} and once as an
explicit Integer. N occurs in no other parameter type, so it cannot be implicit: the language manual allows implicit only for an argument "used as a size argument in the type of another function
argument", and in particular "if the argument is only used in the return type, then it
cannot be marked as implicit" (ISA_LRM, "Size arguments and implicit arguments").
The caller passes it explicitly: FP::Fixup has when 0b1011 => r := FP::Half(N);.
Proposed fix
-function FP::Half(implicit N : {16, 32, 64}, N : Integer) -> Bits(N)+function FP::Half(N : {16, 32, 64}) -> Bits(N)
AI disclosure
Assisted-by: Claude
Claude assisted with source analysis, the proposed correction and drafting this report.
Reviewed with assistance from Codex.
Pinned source: definitions.xml.gz at revision 35eface1b7ee003a1cda95005ec5fd83de658a64.
Activity