Uploaded image for project: 'Etch'
  1. Etch
  2. ETCH-27

mixins cause trouble when two or more mixed in files define a type with the same name.

    XMLWordPrintableJSON

Details

    Description

      three etch files, Foo.etch, Bar.etch, Baz.etch.

      Foo mixes in Bar and Baz.
      Bar and Baz each define a struct Entry ( int x ).
      Bar defines a message void barGet( Entry e )
      Baz defines a message void bazGet( Entry e )

      when you compile Foo the compiler fails because it conducts it search for type Entry from the top down instead of the bottom up. a top down search finds two definitions for Entry. the reference is ambigous and therefore not allowed.

      a bottom up search guarantees that barGet binds to Bar's Entry and bazGet binds to Baz's Entry.

      Attachments

        1. patch.txt
          8 kB
          Robert Scott Comer

        Activity

          People

            sccomer Robert Scott Comer
            sccomer Robert Scott Comer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: