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

Experimental support for if expressions #1069

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Conversation

degory
Copy link
Owner

@degory degory commented Feb 17, 2024

Enhancements:

Bugs fixed:

Technical:

  • Remove some debug output
  • Underlying support for statements having values

Notes:

  • If expressions could generate IL that doesn't assemble, fails to load, or executes incorrectly: use at your own risk
  • Semicolons continue to be accepted at the end of statement lists, but they're no longer required. Unnecessary semicolons are not an error
  • Semicolons are still a terminator for global definitions and definitions within classes, structs and traits

Enhancements:
- Add experimental support for if expressions (see #1060)
- Semicolons are now a statement separator rather than a terminator (see #1060).
- Allow parentheses in type expressions, which can be used to remove ambiguity (for example `(int -> int) -> int` is different to (`int -> (int -> int)`)

Bugs fixed:
- Fix issue with explicit return types for expression bodied generic functions and methods (closes #1067)

Technical:
- Remove some debug output
- Underlying support for statements having values

Notes:
- If expressions could generate IL that doesn't assemble, fails to load, or executes incorrectly: use at your own risk
- Semicolons continue to be accepted at the end of statement lists, but they're no longer required - unnecessary semicolons are not an error
- Semicolons are still a terminator for global definitions and definitions within classes, structs and traits
@degory degory enabled auto-merge (squash) February 17, 2024 10:04
@degory degory merged commit baf415c into main Feb 17, 2024
12 checks passed
@degory degory deleted the degory/if-expressions-1 branch February 17, 2024 10:05
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.

Expression bodied generic functions and methods wrongly attempt to infer return type
1 participant