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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:52:06+00:00 2026-06-06T02:52:06+00:00

In the following code using 2.10.0M3 in Eclipse plugin 2.1.0 for 2.10M3. I’m using

  • 0

In the following code using 2.10.0M3 in Eclipse plugin 2.1.0 for 2.10M3. I’m using the default setting which is targeting JVM 1.5

class GeomBase[T <: DTypes] {          
  abstract class NewObjs {
    def newHex(gridR: GridBase, coodI: Cood): gridR.HexRT          
  }

  class GridBase {
    selfGrid =>
      type HexRT = HexG with T#HexTr

    def uniformRect (init: NewObjs) {
      val hexCood = Cood(2 ,2)
      val hex: HexRT = init.newHex(selfGrid, hexCood)//  won't compile
    }
  }
}

Error message:

Description Resource Path Location Type type mismatch;
  found: GeomBase.this.GridBase#HexG with T#HexTr
  required: GridBase.this.HexRT (which expands to) GridBase.this.HexG with T#HexTr GeomBase.scala   

Why does the compiler think the method returns the type projection GridBase#HexG when it should be this specific instance of GridBase?

Edit transferred to a simpler code class in responce to comments now getting a different error message.

package rStrat
class TestClass {
  abstract class NewObjs {
    def newHex(gridR: GridBase): gridR.HexG
  }     
  class GridBase {
    selfGrid =>         

    def uniformRect (init: NewObjs) {
      val hex: HexG = init.newHex(this) //error here                        
    }       

    class HexG {
      val test12 = 5                 
    }
  }
}

.

Error line 11:Description   Resource    Path    Location    Type
type mismatch;  found   : gridR.HexG  required: GridBase.this.HexG
possible cause: missing arguments for method or constructor TestClass.scala /SStrat/src/rStrat  line 11 Scala Problem

Update I’ve switched to 2.10.0M4 and updated the plug-in to the M4 version on a fresh version of Eclipse and switched to JVM 1.6 (and 1.7) but the problems are unchanged.

  • 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-06T02:52:07+00:00Added an answer on June 6, 2026 at 2:52 am

    logged as SI-5958 – substitute this in dependent method type

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

Sidebar

Related Questions

Consider the following code: using System; namespace ConsoleApplication2 { class Program { static void
I noticed the following behavior in the following code (using threading.Timer class): import threading
I can't compile the following code using g++ 4.1.2: #include <memory> class A {
Im trying to debug the following code using System; public class Parent { string
When I compile the following code using g++ class A {}; void foo(A&) {}
Consider the following code: using System; using System.Runtime.InteropServices; namespace Demo { class Program {
When I am running the following code using Eclipse and NetBeans 6.8. I want
Given the following code: using System; namespace Sandbox { class CommandLine { static void
The following code using System.Threading; class Test { volatile int counter = 0; public
I have the following code: using System; using System.Linq; using System.Linq.Expressions; public class Program

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.