andrewjc2000 commented on a change in pull request #394:
URL: https://github.com/apache/incubator-daffodil/pull/394#discussion_r453982477
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SimpleTypes.scala
##########
@@ -53,9 +54,9 @@ trait TypeBase {
trait NonPrimTypeMixin
sealed trait SimpleTypeBase extends TypeBase
- with HasOptRepTypeMixin {
+ with HasOptRepTypeMixin with SimpleTypeView {
- def primType: PrimType
+ override def primType: PrimType
Review comment:
I went ahead and defined an Enum type called `PrimTypeView` and created
Enum representations for all the "PrimType" enum types within it. I could not
find a way to make the NodeInfo class import *anything* from `dsom.walker`, so
I was unable to make it extend any trait I defined there. Instead, I added a
new field to `SimpleTypeBase` called `primTypeView` which just matches
`primType` to my new Enum type. Let me know if you think this approach should
be changed; the pattern matching is done in `SimpleTypeBase` itself.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]