Boo
  1. Boo
  2. BOO-280

Explicit interface implementation

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      Description

      interface InterfaceA:
      def SomeMethod()

      interface InterfaceB:
      def SomeMethod()

      class SomeClass(InterfaceA, InterfaceB):
      def InterfaceA.SomeMethod():
      print "In InterfaceA.SomeMethod"
      def InterfaceB.SomeMethod():
      print "In InterfaceB.SomeMethod"

      c = SomeClass()

      c.SomeMethod() // Error
      c.InterfaceA.SomeMethod() // Error

      ia = c as InterfaceA
      ia.SomeMethod() // "In InterfaceA.SomeMethod"

      ib = c as InterfaceB
      ib.SomeMethod() // "In InterfaceB.SomeMethod"

      From the c# language specification:

      "It is a compile-time error for an explicit interface member implementation
      to include access modifiers, and it is a compile-time error to include the
      modifiers abstract, virtual, override, or static."

        Issue Links

          Activity

          Hide
          Doug H added a comment -

          this issue can be closed

          Show
          Doug H added a comment - this issue can be closed

            People

            • Assignee:
              Unassigned
              Reporter:
              Sam Kuhn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: