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

More <simple-condition> cleanups #1615

Merged
merged 6 commits into from
Jun 15, 2024
Merged

Conversation

cgay
Copy link
Member

@cgay cgay commented Jun 13, 2024

  • Deprecate <format-string-condition> and replace uses of it with <simple-condition>.
  • Use <simple-error> in some superclass lists where (<error>, <simple-condition>) was used.

cgay added 6 commits June 12, 2024 17:33
* `make-condition(<condition>)` shouldn't pass `format-string:` and
  `format-arguments:` when creating the condition. Added a new method on
  `<simple-condition>` to do that.

* Consolidate testing of `condition-format-string` and
  `condition-format-arguments` into `test-condition(<simple-condition>)` instead
  of duplicating it for each subclass. These tests don't work for `<type-error>`
  because its format string and args are computed from its type and value slots,
  so add `test-condition(<type-error>)` to prevent calling the next method.

* Remove `do-test-type-error-*` functions. I don't think there's anything much
  to test for `<type-error>`, or most condition classes for that matter, since
  they tend to be plain-old-data classes.
We're choosing one name for the class and it will be <simple-condition>.
Replaces superclass lists like `(<error>, <simple-condition>)` with just
`(<simple-error>)`, and similarly for warnings, where the subclass doesn't need
to be abstract.
Use <simple-condition> instead. There's no point having two names for one class.
@cgay cgay merged commit 173e88f into dylan-lang:master Jun 15, 2024
2 of 3 checks passed
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.

1 participant