Github user stevedlawrence commented on a diff in the pull request:
https://github.com/apache/incubator-daffodil/pull/5#discussion_r150864544
--- Diff:
daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dsom/SimpleTypes.scala
---
@@ -141,25 +150,18 @@ abstract class SimpleTypeDefBase(xmlArg: Node,
override val parent: SchemaCompon
res
}
+ /**
+ * Exclusive of self.
+ */
final lazy val bases: Seq[SimpleTypeDefBase] =
if (restrictions.isEmpty) Nil
else restrictions.tail.map { _.simpleType }
- private lazy val sTypeNonDefault: Seq[ChainPropProvider] =
bases.reverse.map { _.nonDefaultFormatChain }
- private lazy val sTypeDefault: Seq[ChainPropProvider] =
bases.reverse.map { _.defaultFormatChain }
-
- // want a QueueSet i.e., fifo order if iterated, but duplicates
- // kept out of the set. Will simulate by calling distinct.
- def nonDefaultPropertySources = LV('nonDefaultPropertySources) {
- val seq = (this.nonDefaultFormatChain +: sTypeNonDefault).distinct
- checkNonOverlap(seq)
- seq
- }.value
+ override final def optReferredToComponent = optRestriction.flatMap {
_.optBaseDef }
- def defaultPropertySources = LV('defaultPropertySources) {
- val seq = (this.defaultFormatChain +: sTypeDefault).distinct
- seq
- }.value
+ // Keep while Debugging - why are these reverse calls here?? TBD
+ // private lazy val sTypeNonDefault: Seq[ChainPropProvider] =
bases.reverse.map { _.nonDefaultFormatChain }
+ // private lazy val sTypeDefault: Seq[ChainPropProvider] =
bases.reverse.map { _.defaultFormatChain }
--- End diff --
Was this determined? I assume reverse is no longer needed?
---