Boo
  1. Boo
  2. BOO-492

Can't compile class which implements IResourceReader

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      Sharpdevelop, dotnet
    • Number of attachments :
      0

      Description

      Compiler fails on compiling the class which implements System.Resources.IResourceReader (like this one)
      class Demo2(IResourceReader):
      def GetEnumerator():
      return null ;

      def Close() :
      pass

      def Dispose():
      pass

      with the message:
      'classname.GetEnumerator' conflicts with inherited member System.Resources.IResourceReader.GetEnumerator

        Activity

        Hide
        Doug H added a comment -

        Look up explicit interface implementations, like here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkexplicitinterfaceimplementationtutorial.asp

        See also how the ResourceReader class implements this interface: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemResourcesResourceReaderMethodsTopic.asp

        import System.Resources
        import System.Collections

        class Demo2(IResourceReader):
        def IResourceReader.GetEnumerator() as IDictionaryEnumerator:
        pass

        def Close() :
        pass

        def Dispose():
        pass

        def IEnumerable.GetEnumerator() as IEnumerator:
        pass

        Show
        Doug H added a comment - Look up explicit interface implementations, like here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkexplicitinterfaceimplementationtutorial.asp See also how the ResourceReader class implements this interface: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemResourcesResourceReaderMethodsTopic.asp import System.Resources import System.Collections class Demo2(IResourceReader): def IResourceReader.GetEnumerator() as IDictionaryEnumerator: pass def Close() : pass def Dispose(): pass def IEnumerable.GetEnumerator() as IEnumerator: pass
        Hide
        Rodrigo B. de Oliveira added a comment -

        Thanks, Doug!

        Show
        Rodrigo B. de Oliveira added a comment - Thanks, Doug!

          People

          • Assignee:
            Doug H
            Reporter:
            Tomislav Tustonic
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: