Skip to content

Add a diagnostic on foo: In(1) being typo'd as foo: 1 #1649

@whitequark

Description

@whitequark

E.g.:

class AsconAEAD128(wiring.Component):
    err: 1

    def elaborate(self, platform):
        m = Module()
        m.d.comb += self.err.eq(1)
        return m

outputs

  File "/home/whitequark/Projects/amaranth-ascon/amaranth_ascon/_aead128.py", line 138, in elaborate
    m.d.comb += self.err.eq(1)
                ^^^^^^^^
AttributeError: 'AsconAEAD128' object has no attribute 'err'

but could output

  File "/home/whitequark/Projects/amaranth-ascon/amaranth_ascon/_aead128.py", line 138, in elaborate
    m.d.comb += self.err.eq(1)
                ^^^^^^^^
AttributeError: 'AsconAEAD128' object has no attribute 'err' (did you intend to annotate 'err: In(1)' or 'err: Out(1)'?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions