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

  • Home
  • SEARCH
  • 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 8610361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:06:44+00:00 2026-06-12T04:06:44+00:00

I’m getting this compilation message: inferred type arguments [sdo.core.domain.Field[_ >: 2 with java.util.UUID <:

  • 0

I’m getting this compilation message:

inferred type arguments [sdo.core.domain.Field[_ >: 2 with java.util.UUID <: java.lang.Comparable[ >: 1 with java.util.UUID <: java.lang.Object] with java.io.Serializable]] do not conform to method ::’s type parameter bounds [B >: sdo.core.domain.Field[ >: String with org.scala_tools.time.Imports.DateTime <: java.lang.Comparable[_ >: java.lang.String with org.joda.time.ReadableInstant <: java.lang.Object] with java.io.Serializable]]
[error] override def fieldList = this.id :: this.create :: this.name :: this.description :: Nil

What I want is a list of Field[_], or anything covariant with Field[_]. How do I do that?

Here’s the code with the issue:

class Work( initialId :EntityUuidIdField, 
    initialName :NameField, 
    initialDescription :TextField) extends Entity{

    val id = initialId
    val name = initialName
    val description :Field[String]= initialDescription
    val create = new DateTimeField()
    val begun = new DateTimeField()
    val inProgress = new DateTimeField()
    val done = new DateTimeField()
    val subjectiveWellBeing = new SubjectiveWellBeingField()
    val size = new WorkSizeField()

    override def fieldList = this.id :: this.create ::  this.name :: this.description       :: Nil

    }

And the definitions of the types:

class DateTimeField extends Field[DateTime] {

class EntityUuidIdField( val id :UUID) extends EntityIdField[UUID]( id) {

class EntityIdField[T]( id :T) extends Field[T] {

class NameField extends Field[String] {

class Field[T] extends Signal[T] {
  • 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-12T04:06:46+00:00Added an answer on June 12, 2026 at 4:06 am

    It looks like it doesn’t like the intersection of the three types; I haven’t tried -Yinfer-debug yet.

    But List(x,y,z) is OK.

    scala> trait X extends Comparable[X] with Serializable
    defined trait X
    
    scala> trait Y extends Comparable[Y] with Serializable
    defined trait Y
    
    scala> case class Foo[+A](a: A)
    defined class Foo
    
    scala> val x: Foo[X] = null
    x: Foo[X] = null
    
    scala>  val y: Foo[Y] = null
    y: Foo[Y] = null
    
    scala> val s : Foo[String] = null
    s: Foo[String] = null
    
    scala> s :: Nil
    res0: List[Foo[String]] = List(null)
    
    scala> y :: s :: Nil
    res1: List[Foo[Comparable[_ >: String with Y <: java.io.Serializable] with java.io.Serializable]] = List(null, null)
    
    scala> x :: y :: s :: Nil
    <console>:15: error: inferred type arguments [Foo[Comparable[_ >: _2 with X <: java.io.Serializable] with java.io.Serializable]] do not conform to method ::'s type parameter bounds [B >: Foo[Comparable[_ >: String with Y <: java.io.Serializable] with java.io.Serializable]]
                  x :: y :: s :: Nil
    
    scala> val u: Foo[java.util.UUID] = null
    u: Foo[java.util.UUID] = null
    
    scala> x :: y :: u :: Nil
    <console>:15: error: inferred type arguments [Foo[Comparable[_ >: _4 with X <: java.io.Serializable] with java.io.Serializable]] do not conform to method ::'s type parameter bounds [B >: Foo[Comparable[_ >: java.util.UUID with Y <: java.io.Serializable] with java.io.Serializable]]
                  x :: y :: u :: Nil
                    ^
    
    scala> val a: Foo[AnyRef] = null
    a: Foo[AnyRef] = null
    
    scala> x :: y :: a :: Nil
    res5: List[Foo[AnyRef]] = List(null, null, null)
    
    scala> trait Z extends Comparable[Z] with Serializable
    defined trait Z
    
    scala> val z: Foo[Z] = null
    z: Foo[Z] = null
    
    scala> x :: y :: z :: Nil
    <console>:16: error: inferred type arguments [Foo[Serializable with Comparable[_ >: _6 with X <: Serializable]]] do not conform to method ::'s type parameter bounds [B >: Foo[Serializable with Comparable[_ >: Z with Y <: Serializable]]]
                  x :: y :: z :: Nil
                    ^
    
    scala> List(x,y,z,s,u)
    res7: List[Foo[Comparable[_ >: java.util.UUID with String with Z with Y with X <: java.io.Serializable] with java.io.Serializable]] = List(null, null, null, null, null)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
This could be a duplicate question, but I have no idea what search terms
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I know there's a lot of other questions out there that deal with this
Does anyone know how can I replace this 2 symbol below from the string

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.