Skip to content
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

Allow one or both conditional operands to be unknown #53

Merged
merged 2 commits into from
May 12, 2017

Conversation

apparentlymart
Copy link
Contributor

@apparentlymart apparentlymart commented May 12, 2017

In #52 we relaxed the rule that any unknown value would immediately cause an early exit, which in turn requires the type checker for each node to specifically deal with unknown values.

However, we missed dealing with the check that both types match in a conditional, causing a conditional to fail if either side of it is unknown.

This causes errors in Terraform, as described in hashicorp/terraform#14399.

Currently these fail, due to a regression that wasn't caught due to us not
having these tests to begin with. They will be fixed in a subsequent
commit.
In #52 we relaxed the rule that any unknown value would immediately cause
an early exit, which in turn requires the type checker for each node to
specifically deal with unknown values.

However, we missed dealing with the check that both types match in a
conditional, causing a conditional to fail if either side of it is
unknown.

This causes errors in Terraform, as described in
hashicorp/terraform#14399.
@apparentlymart apparentlymart self-assigned this May 12, 2017
@apparentlymart apparentlymart requested a review from mitchellh May 12, 2017 20:51
@apparentlymart apparentlymart changed the title B cond unknown Allow one or both conditional operands to be unknown May 12, 2017
@apparentlymart apparentlymart merged commit fac2259 into master May 12, 2017
apparentlymart added a commit to hashicorp/terraform that referenced this pull request May 12, 2017
hashicorp/hil#53 addresses a regression with type checking of unknown
values in the HIL conditional operator.

This fixes #14399.
apparentlymart added a commit to hashicorp/terraform that referenced this pull request May 12, 2017
hashicorp/hil#53 addresses a regression with type checking of unknown
values in the HIL conditional operator.

This fixes #14399.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants