- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Abstract type problems in scala.
Tue, 2012-01-17, 09:58
Dear all,I have a problem with some abstract types and IndexedSeq.
I thought that IndexedSeq(A,B,C) creates an indexedSeq of the first common superclass of A B and C...
abstract class MultiCurveCollectionSet { type A<:FixedStepTermStructureRepriceableCollection[_] type B<:VariableStepTermStructureRepriceableCollection[_] type C<:InterpolatedTermStructureRepriceableCollection[_] type T<:MultiTermStructureCollection[_,A,B,C]
val subcollections:IndexedSeq[T];
private def concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] = IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
}
Leads to the following errors:
error: type mismatch;found : IndexedSeq[MultiCurveCollectionSet.this.A] required: com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]private def concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] = IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
error: type mismatch;found : IndexedSeq[MultiCurveCollectionSet.this.B]required: com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_] private def concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] = IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
error: type mismatch;found : IndexedSeq[MultiCurveCollectionSet.this.C]required: com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_] private def concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] = IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
But:
trait FixedStepTermStructureRepriceableCollection[T<:SecurityInterface] extends MultiCurveRepriceablePublisheableCollection[FixedStepTermStructure]trait VariableStepTermStructureRepriceableCollection[T<:SecurityInterface] extends MultiCurveRepriceablePublisheableCollection[VariableStepTermStructure] trait InterpolatedTermStructureRepriceableCollection[T<:SecurityInterface] extends MultiCurveRepriceablePublisheableCollection[InterpolatedTermStructure]
What is wrong with my code?
Best Regards
Edmondo
Tue, 2012-01-17, 11:01
#2
Re: Abstract type problems in scala.
LOL. Ehm you are right...thank you for your support...here the reworked example:
abstract class MySet { type A<:TraitA[_] type B<:TraitB[_] type C<:TraitC[_] type T<:MyGroup[_,A,B,C]
val subcollections:IndexedSeq[T];
private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC) }
error: type mismatch;found : IndexedSeq[MySet.this.A]required: TraitLetterSuperclass[_]private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC)
error: type mismatch;found : IndexedSeq[MySet.this.B]required: TraitLetterSuperclass[_]private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC)
error: type mismatch;found : IndexedSeq[MySet.this.C]required: TraitLetterSuperclass[_]private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC)
But:
trait TraitA[T<:SomeOtherTrait] extends TraitLetterSuperclass[Double]trait TraitB[T<:SomeOtherTrait] extends TraitLetterSuperclass[Int] trait TraitC[T<:SomeOtherTrait] extends TraitLetterSuperclass[Long]
Thank you very much
Best regard
2012/1/17 Dennis Haupt <h-star@gmx.de>
abstract class MySet { type A<:TraitA[_] type B<:TraitB[_] type C<:TraitC[_] type T<:MyGroup[_,A,B,C]
val subcollections:IndexedSeq[T];
private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC) }
error: type mismatch;found : IndexedSeq[MySet.this.A]required: TraitLetterSuperclass[_]private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC)
error: type mismatch;found : IndexedSeq[MySet.this.B]required: TraitLetterSuperclass[_]private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC)
error: type mismatch;found : IndexedSeq[MySet.this.C]required: TraitLetterSuperclass[_]private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA,itemsB,itemsC)
But:
trait TraitA[T<:SomeOtherTrait] extends TraitLetterSuperclass[Double]trait TraitB[T<:SomeOtherTrait] extends TraitLetterSuperclass[Int] trait TraitC[T<:SomeOtherTrait] extends TraitLetterSuperclass[Long]
Thank you very much
Best regard
2012/1/17 Dennis Haupt <h-star@gmx.de>
your class names are scaring me. pleae provide a simple example with distinguishable class names that contains everything the compiler needs to spill out the error :)
-------- Original-Nachricht --------
> Datum: Tue, 17 Jan 2012 09:58:52 +0100
> Von: Edmondo Porcu <edmondo.porcu@gmail.com>
> An: scala-user <scala-user@googlegroups.com>
> Betreff: [scala-user] Abstract type problems in scala.
> Dear all,
> I have a problem with some abstract types and IndexedSeq.
>
> I thought that IndexedSeq(A,B,C) creates an indexedSeq of the first common
> superclass of A B and C...
>
> abstract class MultiCurveCollectionSet {
> type A<:FixedStepTermStructureRepriceableCollection[_]
> type B<:VariableStepTermStructureRepriceableCollection[_]
> type C<:InterpolatedTermStructureRepriceableCollection[_]
> type T<:MultiTermStructureCollection[_,A,B,C]
>
> val subcollections:IndexedSeq[T];
>
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
>
>
> }
>
> Leads to the following errors:
>
> error: type mismatch;
> found : IndexedSeq[MultiCurveCollectionSet.this.A]
> required:
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
> error: type mismatch;
> found : IndexedSeq[MultiCurveCollectionSet.this.B]
> required:
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
> error: type mismatch;
> found : IndexedSeq[MultiCurveCollectionSet.this.C]
> required:
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
>
> But:
>
> trait FixedStepTermStructureRepriceableCollection[T<:SecurityInterface]
> extends
> MultiCurveRepriceablePublisheableCollection[FixedStepTermStructure]
> trait VariableStepTermStructureRepriceableCollection[T<:SecurityInterface]
> extends
> MultiCurveRepriceablePublisheableCollection[VariableStepTermStructure]
> trait InterpolatedTermStructureRepriceableCollection[T<:SecurityInterface]
> extends
> MultiCurveRepriceablePublisheableCollection[InterpolatedTermStructure]
>
>
> What is wrong with my code?
>
> Best Regards
>
> Edmondo
Tue, 2012-01-17, 12:41
#3
Re: Abstract type problems in scala.
your problem was very, very simple, but camouflaged by traits, generics and types.
what you did: Seq(seq1, seq2, seq3) -> returns a nested seq
what you intended: seq1++seq2++seq3 -> returns a flat seq
abstract class MySet {
type A <: TraitA[_]
type B <: TraitB[_]
type C <: TraitC[_]
private val itemsA = null:TraitA[JLabel with SomeOtherTrait]
private val itemsB = null:TraitB[JList with SomeOtherTrait2]
private val itemsC = null:TraitC[JRadioButton with SomeOtherTrait3]
private val itemsA2 = null.asInstanceOf[A]
private val itemsB2 = null.asInstanceOf[B]
private val itemsC2 = null.asInstanceOf[C]
private def concatenated: IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA, itemsB, itemsC)
private def concatenated2: IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA2, itemsB2, itemsC2)
}
trait TraitA[T <: SomeOtherTrait] extends TraitLetterSuperclass[Int]
trait TraitB[T <: SomeOtherTrait2] extends TraitLetterSuperclass[Double]
trait TraitC[T <: SomeOtherTrait3] extends TraitLetterSuperclass[Long]
trait SomeOtherTrait
trait SomeOtherTrait2
trait SomeOtherTrait3
trait TraitLetterSuperclass[_]
-------- Original-Nachricht --------
> Datum: Tue, 17 Jan 2012 10:59:40 +0100
> Von: Edmondo Porcu
> An: Dennis Haupt
> CC: scala-user@googlegroups.com
> Betreff: Re: [scala-user] Abstract type problems in scala.
> LOL. Ehm you are right...thank you for your support...here the reworked
> example:
>
> abstract class MySet {
> type A<:TraitA[_]
> type B<:TraitB[_]
> type C<:TraitC[_]
> type T<:MyGroup[_,A,B,C]
>
> val subcollections:IndexedSeq[T];
>
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
> }
>
>
> error: type mismatch;
> found : IndexedSeq[MySet.this.A]
> required: TraitLetterSuperclass[_]
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
> error: type mismatch;
> found : IndexedSeq[MySet.this.B]
> required: TraitLetterSuperclass[_]
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
> error: type mismatch;
> found : IndexedSeq[MySet.this.C]
> required: TraitLetterSuperclass[_]
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
>
> But:
>
> trait TraitA[T<:SomeOtherTrait] extends TraitLetterSuperclass[Double]
> trait TraitB[T<:SomeOtherTrait] extends TraitLetterSuperclass[Int]
> trait TraitC[T<:SomeOtherTrait] extends TraitLetterSuperclass[Long]
>
> Thank you very much
>
> Best regard
>
> 2012/1/17 Dennis Haupt
>
> > your class names are scaring me. pleae provide a simple example with
> > distinguishable class names that contains everything the compiler needs
> to
> > spill out the error :)
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 17 Jan 2012 09:58:52 +0100
> > > Von: Edmondo Porcu
> > > An: scala-user
> > > Betreff: [scala-user] Abstract type problems in scala.
> >
> > > Dear all,
> > > I have a problem with some abstract types and IndexedSeq.
> > >
> > > I thought that IndexedSeq(A,B,C) creates an indexedSeq of the first
> > common
> > > superclass of A B and C...
> > >
> > > abstract class MultiCurveCollectionSet {
> > > type A<:FixedStepTermStructureRepriceableCollection[_]
> > > type B<:VariableStepTermStructureRepriceableCollection[_]
> > > type C<:InterpolatedTermStructureRepriceableCollection[_]
> > > type T<:MultiTermStructureCollection[_,A,B,C]
> > >
> > > val subcollections:IndexedSeq[T];
> > >
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > >
> > >
> > > }
> > >
> > > Leads to the following errors:
> > >
> > > error: type mismatch;
> > > found : IndexedSeq[MultiCurveCollectionSet.this.A]
> > > required:
> > >
> >
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > > error: type mismatch;
> > > found : IndexedSeq[MultiCurveCollectionSet.this.B]
> > > required:
> > >
> >
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > > error: type mismatch;
> > > found : IndexedSeq[MultiCurveCollectionSet.this.C]
> > > required:
> > >
> >
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > >
> > > But:
> > >
> > > trait
> FixedStepTermStructureRepriceableCollection[T<:SecurityInterface]
> > > extends
> > > MultiCurveRepriceablePublisheableCollection[FixedStepTermStructure]
> > > trait
> > VariableStepTermStructureRepriceableCollection[T<:SecurityInterface]
> > > extends
> > > MultiCurveRepriceablePublisheableCollection[VariableStepTermStructure]
> > > trait
> > InterpolatedTermStructureRepriceableCollection[T<:SecurityInterface]
> > > extends
> > > MultiCurveRepriceablePublisheableCollection[InterpolatedTermStructure]
> > >
> > >
> > > What is wrong with my code?
> > >
> > > Best Regards
> > >
> > > Edmondo
> >
Thu, 2012-01-19, 11:31
#4
Re: Abstract type problems in scala.
Yes that was the answer...TRICKY!Thank you very much..Best RegardsEdmondo
2012/1/17 Dennis Haupt <h-star@gmx.de>
2012/1/17 Dennis Haupt <h-star@gmx.de>
your problem was very, very simple, but camouflaged by traits, generics and types.
what you did: Seq(seq1, seq2, seq3) -> returns a nested seq
what you intended: seq1++seq2++seq3 -> returns a flat seq
abstract class MySet {
type A <: TraitA[_]
type B <: TraitB[_]
type C <: TraitC[_]
private val itemsA = null:TraitA[JLabel with SomeOtherTrait]
private val itemsB = null:TraitB[JList with SomeOtherTrait2]
private val itemsC = null:TraitC[JRadioButton with SomeOtherTrait3]
private val itemsA2 = null.asInstanceOf[A]
private val itemsB2 = null.asInstanceOf[B]
private val itemsC2 = null.asInstanceOf[C]
private def concatenated: IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA, itemsB, itemsC)
private def concatenated2: IndexedSeq[TraitLetterSuperclass[_]] = IndexedSeq(itemsA2, itemsB2, itemsC2)
}
trait TraitA[T <: SomeOtherTrait] extends TraitLetterSuperclass[Int]
trait TraitB[T <: SomeOtherTrait2] extends TraitLetterSuperclass[Double]
trait TraitC[T <: SomeOtherTrait3] extends TraitLetterSuperclass[Long]
trait SomeOtherTrait
trait SomeOtherTrait2
trait SomeOtherTrait3
trait TraitLetterSuperclass[_]
-------- Original-Nachricht --------
> Datum: Tue, 17 Jan 2012 10:59:40 +0100
> Von: Edmondo Porcu <edmondo.porcu@gmail.com>
> An: Dennis Haupt <h-star@gmx.de>
> CC: scala-user@googlegroups.com
> Betreff: Re: [scala-user] Abstract type problems in scala.
> LOL. Ehm you are right...thank you for your support...here the reworked
> example:
>
> abstract class MySet {
> type A<:TraitA[_]
> type B<:TraitB[_]
> type C<:TraitC[_]
> type T<:MyGroup[_,A,B,C]
>
> val subcollections:IndexedSeq[T];
>
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
> }
>
>
> error: type mismatch;
> found : IndexedSeq[MySet.this.A]
> required: TraitLetterSuperclass[_]
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
> error: type mismatch;
> found : IndexedSeq[MySet.this.B]
> required: TraitLetterSuperclass[_]
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
> error: type mismatch;
> found : IndexedSeq[MySet.this.C]
> required: TraitLetterSuperclass[_]
> private def concatenated:IndexedSeq[TraitLetterSuperclass[_]] =
> IndexedSeq(itemsA,itemsB,itemsC)
>
>
> But:
>
> trait TraitA[T<:SomeOtherTrait] extends TraitLetterSuperclass[Double]
> trait TraitB[T<:SomeOtherTrait] extends TraitLetterSuperclass[Int]
> trait TraitC[T<:SomeOtherTrait] extends TraitLetterSuperclass[Long]
>
> Thank you very much
>
> Best regard
>
> 2012/1/17 Dennis Haupt <h-star@gmx.de>
>
> > your class names are scaring me. pleae provide a simple example with
> > distinguishable class names that contains everything the compiler needs
> to
> > spill out the error :)
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 17 Jan 2012 09:58:52 +0100
> > > Von: Edmondo Porcu <edmondo.porcu@gmail.com>
> > > An: scala-user <scala-user@googlegroups.com>
> > > Betreff: [scala-user] Abstract type problems in scala.
> >
> > > Dear all,
> > > I have a problem with some abstract types and IndexedSeq.
> > >
> > > I thought that IndexedSeq(A,B,C) creates an indexedSeq of the first
> > common
> > > superclass of A B and C...
> > >
> > > abstract class MultiCurveCollectionSet {
> > > type A<:FixedStepTermStructureRepriceableCollection[_]
> > > type B<:VariableStepTermStructureRepriceableCollection[_]
> > > type C<:InterpolatedTermStructureRepriceableCollection[_]
> > > type T<:MultiTermStructureCollection[_,A,B,C]
> > >
> > > val subcollections:IndexedSeq[T];
> > >
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > >
> > >
> > > }
> > >
> > > Leads to the following errors:
> > >
> > > error: type mismatch;
> > > found : IndexedSeq[MultiCurveCollectionSet.this.A]
> > > required:
> > >
> >
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > > error: type mismatch;
> > > found : IndexedSeq[MultiCurveCollectionSet.this.B]
> > > required:
> > >
> >
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > > error: type mismatch;
> > > found : IndexedSeq[MultiCurveCollectionSet.this.C]
> > > required:
> > >
> >
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> > > private def
> > >
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> > >
> >
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
> > >
> > >
> > > But:
> > >
> > > trait
> FixedStepTermStructureRepriceableCollection[T<:SecurityInterface]
> > > extends
> > > MultiCurveRepriceablePublisheableCollection[FixedStepTermStructure]
> > > trait
> > VariableStepTermStructureRepriceableCollection[T<:SecurityInterface]
> > > extends
> > > MultiCurveRepriceablePublisheableCollection[VariableStepTermStructure]
> > > trait
> > InterpolatedTermStructureRepriceableCollection[T<:SecurityInterface]
> > > extends
> > > MultiCurveRepriceablePublisheableCollection[InterpolatedTermStructure]
> > >
> > >
> > > What is wrong with my code?
> > >
> > > Best Regards
> > >
> > > Edmondo
> >
your class names are scaring me. pleae provide a simple example with distinguishable class names that contains everything the compiler needs to spill out the error :)
-------- Original-Nachricht --------
> Datum: Tue, 17 Jan 2012 09:58:52 +0100
> Von: Edmondo Porcu
> An: scala-user
> Betreff: [scala-user] Abstract type problems in scala.
> Dear all,
> I have a problem with some abstract types and IndexedSeq.
>
> I thought that IndexedSeq(A,B,C) creates an indexedSeq of the first common
> superclass of A B and C...
>
> abstract class MultiCurveCollectionSet {
> type A<:FixedStepTermStructureRepriceableCollection[_]
> type B<:VariableStepTermStructureRepriceableCollection[_]
> type C<:InterpolatedTermStructureRepriceableCollection[_]
> type T<:MultiTermStructureCollection[_,A,B,C]
>
> val subcollections:IndexedSeq[T];
>
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
>
>
> }
>
> Leads to the following errors:
>
> error: type mismatch;
> found : IndexedSeq[MultiCurveCollectionSet.this.A]
> required:
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
> error: type mismatch;
> found : IndexedSeq[MultiCurveCollectionSet.this.B]
> required:
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
> error: type mismatch;
> found : IndexedSeq[MultiCurveCollectionSet.this.C]
> required:
> com.gottex.gottware.common.datamodels.finance.collections.traits.MultiCurveRepriceablePublisheableCollection[_]
> private def
> concatenated:IndexedSeq[MultiCurveRepriceablePublisheableCollection[_]] =
> IndexedSeq(fixedStepTermStructureItems,variableStepTermStructureItems,interpolatedStepTermStructureItems)
>
>
> But:
>
> trait FixedStepTermStructureRepriceableCollection[T<:SecurityInterface]
> extends
> MultiCurveRepriceablePublisheableCollection[FixedStepTermStructure]
> trait VariableStepTermStructureRepriceableCollection[T<:SecurityInterface]
> extends
> MultiCurveRepriceablePublisheableCollection[VariableStepTermStructure]
> trait InterpolatedTermStructureRepriceableCollection[T<:SecurityInterface]
> extends
> MultiCurveRepriceablePublisheableCollection[InterpolatedTermStructure]
>
>
> What is wrong with my code?
>
> Best Regards
>
> Edmondo