dnanexus / wdlTools

WDL tools for parsing, type-checking, and more
Apache License 2.0
25 stars 7 forks source link

Fix for #230 #231

Closed jdidion closed 2 years ago

jdidion commented 2 years ago

In a V2Runtime, the get method is currently trying to coerce to the intersection of the allowed and destination types. For memory (and maybe others) there is a problem - the allowed types are [T_String, T_Int] but the dest type is [T_Int], so the intersection is [T_Int] and coercion from T_String throws an exception. What you need to do instead is first evaluate the expression to one of the allowed types, then coerce to the destination type, which is what is implemented in this PR.

jdidion commented 2 years ago

Sorry, just added it

commandlinegirl commented 2 years ago

This is now released in https://github.com/dnanexus/dxCompiler/releases/tag/2.10.6 cc @jdidion - thank you!