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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:18:42+00:00 2026-05-14T07:18:42+00:00

What does the following error message mean? cannot override a concrete member without a

  • 0

What does the following error message mean?

cannot override a concrete member
without a third member that’s
overridden by both (this rule is
designed to prevent “accidental
overrides”);

I was trying to do stackable trait modifications. It’s a little bit after the fact since I already have a hierarchy in place and I’m trying to modify the behavior without having to rewrite a lot of code.

I have a base class called AbstractProcessor that defines an abstract method sort of like this:

abstract class AbstractProcessor {
  def onPush(i:Info): Unit
}

I have a couple existing traits, to implement different onPush behaviors.

trait Pass1 {
  def onPush(i:Info): Unit = { /* stuff */ }
}

trait Pass2 {
  def onPush(i:Info): Unit = { /* stuff */ }
}

So that allows me to use new AbstractProcessor with Pass1 or new AbstractProcessor with Pass2.

Now I would like to do some processing before and after the onPush call in Pass1 and Pass2 while minimizing code changes to AbstractProcessor and Pass1 and Pass2. I thought of creating a trait that does something like this:

trait Custom extends AbstractProcessor {
  abstract override def onPush(i:Info): Unit = {
    // do stuff before
    super.onPush(i)
    // do stuff after
  }
}

And using it with new AbstractProcessor with Pass1 with Custom and I got that error message.

  • 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-14T07:18:42+00:00Added an answer on May 14, 2026 at 7:18 am

    The problem is that there is ambiguity between AbstractProcessor.onPush and Pass1.onPush. The latter is not overridding the former because Pass1 does not extend AbstractProcessor.

    If you make Pass1 and Pass2 extend AbstractProcessor, then the problem is solved.

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

Sidebar

Related Questions

I get the following error message in SQL Server 2005: User '<username>' does not
What does the following error mean? Geeneration of designer file failed: Exception from HRESULT:
What does the following mean? Class.Function(variable := 1 + 1) What is this operator
In MySQL 5.0 why does the following error occur when trying to create a
Why does the following code NOT give an error, nor any type of a
Why does the following code sometimes causes an Exception with the contents CLIPBRD_E_CANT_OPEN: Clipboard.SetText(str);
Why does the following code not work as I was expecting? <?php $data =
Why does the following method hang? public void pipe(Reader in, Writer out) { CharBuffer
What does the following code do in C/C++? if (blah(), 5) { //do something
What does the following code do? A link to something in the PHP manual

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.