mbeckerle 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_r297690373
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/DPathRuntime.scala
##########
@@ -72,13 +74,15 @@ class CompiledDPath(val ops: RecipeOp*) extends
Serializable {
* TODO: constant folding really should operate on sub-expressions of
expressions
* so that part of an expression can be constant, not necessarily the whole
thing.
*/
- def runExpressionForConstant(sfl: SchemaFileLocation, compileInfo:
DPathCompileInfo): Option[AnyRef] = {
+ def runExpressionForConstant(
+ sfl: SchemaFileLocation,
+ compileInfo: DPathCompileInfo ): Option[AnyRef] = {
//
// we use a special dummy dstate here that errors out via throw
// if the evaluation tries to get a processor state or node.
//
- val dstate = new DStateForConstantFolding(compileInfo)
+ val dstate = new DStateForConstantFolding(compileInfo,
compileInfo.typeCalcMap)
Review comment:
Is there actually code which calls this DStateForconstantFolding specifying
a typeCalcMap coming from elsewhere? If not then it's confusing to pass
compileInfo and compileInfo.typeCalcMap.
----------------------------------------------------------------
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