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 6327749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:20:07+00:00 2026-05-24T17:20:07+00:00

I am working with Scala 2.9.0.1 in Eclipse. I have a Scala class/trait hierarchy,

  • 0

I am working with Scala 2.9.0.1 in Eclipse.

I have a Scala class/trait hierarchy, with something like:

A.scala: trait A
B.scala: trait B extends A
C.scala: trait C extends B

Except more complicated; too big to post as example.

So, C depends indirectly on A, but A does not know anything about C.

Now if I change A, I get error everywhere, so I work my way up. Once I finally fixed the last error in C, suddenly the compiler tells me that A cannot be compiled. Since A does not in any way depend on C, this makes no logical sense. In fact I would say it is a compiler bug. This happened to me several times now, and it is very frustrating, because it means I have to change A again, and modify my whole class hierarchy again.

Is there any way to get the Scala compiler (in Eclipse) to give me reliable results? Am I the only one that gets this behavior?

  • 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-05-24T17:20:07+00:00Added an answer on May 24, 2026 at 5:20 pm

    I have also observed that a Scala program can have “hierarchies” of errors, where certain compile errors don’t get revealed until others are fixed. This isn’t necessarily a compiler bug (Others say this is likely a bug with the old Scala IDE builder that’s been fixed in trunk.)

    One strategy is to make the changes incrementally:

    1. Make a copy of trait A and call it trait A2.
    2. Make the desired changes to A2, fixing any compile errors that show up. This is easy since nothing depends on A2 yet.
    3. Repeat for B2, C2, etc.

    Once everything is working, replace the original traits with the modified ones. Revision control (I use git) can be very helpful in this process.

    Another general tactic that I find useful is to divide the design into two stages:

    1. First, I code just the types, leaving all the method bodies empty. It’s much easier to fix type errors before there’s any real code in the way.

    2. Once the types are consistent, I can fill in the method definitions independently without worrying about complicated compile errors.

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

Sidebar

Related Questions

When working with Java from Scala, we have to account for null. HttpServletRequest getters
I installed Scala IDE for Eclipse , and it seems to be working okay.
I have been working on a project in scala, but I am getting some
I am working on a simple project in Eclipse in Scala-IDE. The project makes
I'm working on simple UI that has a scala.swing.Table component. I'd like to sort
I have a Scala project setup and working in my workstation. I want to
I'm working on a Scala API (for Twilio, by the way) where operations have
I am working on a small Scala project. I have the following issue with
The following pseudo-Scala yields an illegal cyclic reference error: trait GenT[A] trait T extends
While working with a Java class in Scala, I noticed that Scala can't multiply

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.