You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Rick (Jira)" <ji...@apache.org> on 2020/09/01 23:19:00 UTC

[jira] [Commented] (DAFFODIL-1043) Bad diagnostic message: The type Complex cannot be converted to ....

    [ https://issues.apache.org/jira/browse/DAFFODIL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188856#comment-17188856 ] 

Rick commented on DAFFODIL-1043:
--------------------------------

With regard to test_assertFailShowsValue2

The relevant code is in Conversions.scala LN 276 :
The exposed object is relevantExpr as an instance of Expression
Changing the line
From relevantExpr.text,
To relevantExpr.wholeExpressionText,
Results in the new error message:
"In expression xs:int(.) eq 42, the type Complex cannot be converted to xs:int.""
Which I believe provides a solution?

I'm continuing to evaluate test_checkConstraintsComplexTypeFails

> Bad diagnostic message: The type Complex cannot be converted to ....
> --------------------------------------------------------------------
>
>                 Key: DAFFODIL-1043
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1043
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Diagnostics, Front End, Usability
>    Affects Versions: s15
>            Reporter: Mike Beckerle
>            Assignee: Rick
>            Priority: Minor
>              Labels: beginner
>
> The type Complex cannot be converted to .....
> This schema definition error is produced in situations where one has a complex element type, but you are using it in an expression that requires a simple type.
> The message needs to provide more info. E.g., 
> test_checkConstraintsComplexTypeFails has an expression containing dfdl:checkConstraints(.) but on a complex type. The message doesn't contain the expression text anywhere. 
> test_assertFailShowsValue2 has an assertion which tries to evaluate the expression "." on a complex type. Again no mention of the expression, or it appearing in an assertion test.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)