Skip to content

Commit

Permalink
Workaround for an issue with to_text dispatch. See #1538
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Mar 28, 2023
1 parent b5d374b commit 8662cd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions distribution/lib/Standard/Test/0.0.0-dev/src/Extensions.enso
Expand Up @@ -45,6 +45,9 @@ Error.should_fail_with self matcher frames_to_skip=0 =
caught = self.catch
if caught == matcher || caught.is_a matcher then Nothing else
loc = Meta.get_source_location 3+frames_to_skip
matcher_text = case matcher.to_text of
text : Text -> text
_ -> Meta.meta matcher . to_text
Test.fail ("Expected error "+matcher.to_text+", but error " + caught.to_text + " has been returned (at " + loc + ").")

## Asserts that `self` value is equal to the expected value.
Expand Down

0 comments on commit 8662cd9

Please sign in to comment.