Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8973595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:28:56+00:00 2026-06-15T18:28:56+00:00

In my application, there is this line of code causing trouble: public class DisplayListing<R

  • 0

In my application, there is this line of code causing trouble:

public class DisplayListing<R extends Listing<R, L>, L extends Listing<R, L>.Loader> extends SherlockListFragment { ... }

Working with Eclipse everything behaves fine. But after switching to IntelliJ IDEA errors are popping up:

No enclosing instance of type ‘com.app.Listing’ is in scope.

This error message refers to the part Listing<R, L>.Loader (Loader is a non-static class).

When I go to IntelliJ’s preferences and change the compiler from Javac to Eclipse I’m back to business: the application will successfully compile and run again.

But the red mark indicating an error will stay (and I would like to get rid of that). So I’m wondering if I’m actually doing something wrong and my generic arguments should be fixed or if it is okay to rely on the Eclipse compiler and ignore the error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:28:57+00:00Added an answer on June 15, 2026 at 6:28 pm

    This is a legitimate bug, and it can be reproduced without any complex generics:

    public class Foo<T extends Bar.Baz> {}
    
    class Bar {
        class Baz {}
    }
    

    It appears that the IntelliJ parser (not its compiler, which is either javac or ecj) is mistaking the extends Bar.Baz to be part of the declaration of Foo, not T. In other words, it’s the same error that you (correctly) get when you do this:

    public class Foo extends Bar.Baz {}
    

    This is IDEA Issue #94011. You can upvote that issue to give it greater notice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am talking about this line of code <link rel=alternate type=application/rss+xml title=example.com &raquo; Comments
In System.Windows.Forms.Application there are two properties called LocalUserAppDataPath and UserAppDataPath . On this computer
I'm maintaining an application that goes sort of like this: There is a Page
So I have a UIViewController (main application controller is a TabBarController). On this there
Is there anything like this outside of the application delegate? I would just like
Is there an application to convert a svg drawing to Java's Path2d? Is this
I have created a folder called diagrams in my application. In this folder there
I've got this flow on an enterprise application: on every service page there is
I deployed an application using this method and it worked very good. However, there
I'll try to explain this with an example. I'm writing a chat application. There

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.