[Mono-bugs] [Bug 658356] New: Overriding nested class must be in same java file as parent

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 8 15:58:52 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=658356

https://bugzilla.novell.com/show_bug.cgi?id=658356#c0


           Summary: Overriding nested class must be in same java file as
                    parent
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Tools
        AssignedTo: jpryor at novell.com
        ReportedBy: jpobst at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


The following code:

using Android.Service.Wallpaper;

namespace LiveWallpaperDemo
{
    class CubeWallpaper : WallpaperService
    {
        public override WallpaperService.Engine OnCreateEngine ()
        {
            return new CubeEngine ();
        }

        class CubeEngine : WallpaperService.Engine
        {
            public CubeEngine ()
            {
            }
        }
    }
}

Does not compile with:
CubeWallpaper_CubeEngine.java:16: an enclosing instance that contains
android.service.wallpaper.WallpaperService.Engine is required
          super ();
          ^
  1 error

Because we write the nested class into it's own .java file instead of the
parent class's .java file.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list