| Summary: | [QVTc] Unable to match parameter type in query invocations | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Victor Roldan Betancort <vroldanbet> |
| Component: | UMLX | Assignee: | Ed Willink <ed> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | vsanchez |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Thanks for this.
[Functions are missing from the QVTc spec, so everything here is an extension.]
Your example is invalid so at least you get an error.
More seriously umlRdbms::getStringSize('foobar') = 6; does not give an error.
To give your example consistent behaviour QVTcEnvironment needs to support lookup of unqualified function names in the transformation scope. Will do.
------
Parsing predicates and assignments is awkward because their syntax is very similar. To avoid conflicts an assignment is parsed as
oclExpression ":=" oclExpression
rather than
name "." name ":=" oclExpression
Your example has therefore been parsed as a 'valid' left hand side, although the lookup fails. AbstractQVTcAnalyzer should reject use of anything other than
name "." name in the left hand expression. Will do.
Fixed in CVS. Unqualified queries are now allowed in plausible contexts. Example here now gives "Assignment to property or variable expected". |
Build ID: I20080617-2000 The editor is unable to match types of query invocation actual parameters. The following transformation evidences this inconsistency, where the editor shows an error for "getStringSize('foobar') = 6;" predicate. transformation umlRdbms { middle imports tuml2rdbms; } query umlRdbms::getStringSize (someString:String): Integer { someString -> size() } map ClassToTable in umlRdbms { where middle () { getStringSize('foobar') = 6; } }