stevedlawrence commented on a change in pull request #249: Emit SDE when a type 
calculator attempts to use an undefined type.
URL: https://github.com/apache/incubator-daffodil/pull/249#discussion_r299137145
 
 

 ##########
 File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/TypeCalculator.scala
 ##########
 @@ -349,10 +366,19 @@ object TypeCalculatorCompiler {
     }
   }
 
-  def compileExpression[A <: AnyRef, B <: AnyRef](optInputTypeCalc: 
Option[CompiledExpression[B]], optOutputTypeCalc: 
Option[CompiledExpression[A]], srcType: NodeInfo.Kind, dstType: NodeInfo.Kind): 
ExpressionTypeCalculator[A, B] = {
-    val maybeInputType: Maybe[CompiledExpression[B]] = 
optInputTypeCalc.map(Maybe(_)).getOrElse(Maybe.Nope)
-    val maybeOutputType: Maybe[CompiledExpression[A]] = 
optOutputTypeCalc.map(Maybe(_)).getOrElse(Maybe.Nope)
-    new ExpressionTypeCalculator(maybeInputType, maybeOutputType, srcType, 
dstType)
+  /*
+   * compileExpression is already a highly overloaded name from the DPath 
expression compiler.
+   * While this technically overload that function, to avoid confusion, we are 
giving it a different
+   * name entirely.
+   */
+  def compileFromExpression[A <: AnyRef, B <: AnyRef](
 
 Review comment:
   Maybe rename it compileTypeCalculatorExpression or something to make it more 
clear how it differs from compileExpression?

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