-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map literals: improve type inference and error messages #256
Comments
Hi @nh13, thanks for reporting -- this is a pretty gnarly subtlety arising from how WDL structs are currently (prior to openwdl/wdl#297) initialized from
|
Also, #255 shows that the type unification logic for map literal is lacking in sophistication (fails to unify Lines 690 to 694 in d250427
|
I’ll use the object literal constructor going forward but I’ll leave it open in case someone wants to implement it. |
factor out type unification logic shared with Array & IfThenElse addresses #256
Hello ! For example, this example fails with version 1.4.1:
Thanks :) |
@mlin I'm sorry to bother you but could you please re-open that issue ? |
@Melkaz try inserting the Without the keyword, the structure in the braces is understood as a Map with homogeneous value types (implicitly coercing the boolean to a string, a one-way door). Whereas This is a significant pitfall in the language obviously, I'll think about ways to provide a better error message in this case. @ynedelec were you just pinging o/b/o @Melkaz or did you have a separate problem? thanks |
Thanks Mike. I'm good for using I'm advocating for changing to WDL and I must pay attention to those little quirks when I'll train people in order to simplify their work. Thanks :) |
@ynedelec I think the confusion between WDL 1.1 has a new struct initialization syntax, but it's essentially the same old object initializer except you replace |
The
struct
has typeFile
for membersome_file
, and tasksome_task
has an output membersome_file
that has typeFile
, so why isminiwdl check
failing?The text was updated successfully, but these errors were encountered: