stevedlawrence commented on a change in pull request #207: Added support for 
enumerations and TypeValueCalc
URL: https://github.com/apache/incubator-daffodil/pull/207#discussion_r278211636
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ChoiceGroup.scala
 ##########
 @@ -118,9 +123,32 @@ abstract class ChoiceTermBase(
 
   final protected lazy val optionChoiceDispatchKeyRaw = 
findPropertyOption("choiceDispatchKey")
   final protected lazy val choiceDispatchKeyRaw = 
requireProperty(optionChoiceDispatchKeyRaw)
+  
+  lazy val optionChoiceDispatchKeyKindRaw = 
findPropertyOption("choiceDispatchKeyKind")
+  lazy val defaultableChoiceDispatchKeyKind = 
+    if(tunable.requireChoiceDispatchKeyKindProperty){
+      choiceDispatchKeyKind
+    }else{
+      val asString = 
optionChoiceDispatchKeyKindRaw.toOption.getOrElse("implicit")
+      ChoiceKeyKindType(asString,this)
+    }
+  
+  lazy val optionChoiceBranchKeyKindRaw = 
findPropertyOption("choiceBranchKeyKind")
+  lazy val defaultableChoiceBranchKeyKind = 
+    if(tunable.requireChoiceBranchKeyKindProperty){
+      choiceDispatchKeyKind
+    }else{
+      val asString = 
optionChoiceBranchKeyKindRaw.toOption.getOrElse("implicit")
+      ChoiceKeyKindType(asString,this)
+    }
 
   final lazy val isDirectDispatch = {
-    val isDD = optionChoiceDispatchKeyRaw.isDefined
+    val isDD :Boolean = defaultableChoiceDispatchKeyKind match{
 
 Review comment:
   Don't need the :Boolean here, but if you do have it, the style is ``val 
isDD: Boolean``. Also need a space after ``match``.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to