-
Notifications
You must be signed in to change notification settings - Fork 29
#1686. Expect runtime error in case of cast pattern #1713
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eernstg
approved these changes
Jan 10, 2023
Member
eernstg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
eernstg
reviewed
Jan 10, 2023
| main() { | ||
| num d = 3.14; | ||
| Expect.throws(() { | ||
| (d as double) = "one"; |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cf. #1686: This should actually be a compile-time error, if @munificent agrees on the understanding of a specific sentence about this situation.
copybara-service bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Jan 13, 2023
2023-01-12 [email protected] Fixes dart-lang/co19#1702. wildcards_A01_t01.dart. Use correct types in list pattern (dart-lang/co19#1728) 2023-01-12 [email protected] Fixes dart-lang/co19#1708. Specify type of the list pattern (dart-lang/co19#1733) 2023-01-12 [email protected] Fixes dart-lang/co19#1681. Improve object pattern testing in a pattern assignment (dart-lang/co19#1735) 2023-01-12 [email protected] Fixes dart-lang/co19#1740. constant_A03_t05.dart. Typo fixed (dart-lang/co19#1749) 2023-01-12 [email protected] Fixes dart-lang/co19#1744. object_A01_t05.dart fixed not to fail in a weak mode (dart-lang/co19#1752) 2023-01-12 [email protected] Fixes dart-lang/co19#1745. switch_statement_A04_t01.dart. Typo fixed (dart-lang/co19#1753) 2023-01-12 [email protected] Fixes dart-lang/co19#1746. switch_statement_A07_t02.dart. Change type in cast pattern to Object (dart-lang/co19#1754) 2023-01-12 [email protected] Fixes dart-lang/co19#1747. variable_A02_t01.dart. Fix expected result for map pattern (dart-lang/co19#1755) 2023-01-12 [email protected] Fixes dart-lang/co19#1748. variable_A02_t04.dart. Typo fixed (dart-lang/co19#1756) 2023-01-12 [email protected] dart-lang/co19#1401. [Patterns] cast, null-assert and null-check patterns tests added (dart-lang/co19#1537) 2023-01-12 [email protected] Fixes dart-lang/co19#1629. Logical and pattern tests fixed (dart-lang/co19#1757) 2023-01-12 [email protected] Fixes dart-lang/co19#1743. Convert double value to int (dart-lang/co19#1751) 2023-01-11 [email protected] Fixes dart-lang/co19#1709. Error expectations updated for CFE (dart-lang/co19#1736) 2023-01-11 [email protected] dart-lang/co19#1401. [Patterns] Object pattern test added (dart-lang/co19#1652) 2023-01-11 [email protected] Fixes dart-lang/co19#1699. variable_A01_t01.dart. Fix types used in a list pattern (dart-lang/co19#1725) 2023-01-11 [email protected] Fixes dart-lang/co19#1734. Expect a static warning in case of not-necessary null-check/assert (dart-lang/co19#1738) 2023-01-11 [email protected] dart-lang/co19#1737. Roll failures fixed (dart-lang/co19#1739) 2023-01-10 [email protected] Fixes dart-lang/co19#1682. pattern_assignment_A21_t01.dart. Use dynamic instead of Record class (dart-lang/co19#1710) 2023-01-10 [email protected] Fixes dart-lang/co19#1683. pattern_assignment_A05_t04.dart. Use record type instead of Record class (dart-lang/co19#1711) 2023-01-10 [email protected] Fixes dart-lang/co19#1684. Use record type instead of Record class, add missing `late` keywords (dart-lang/co19#1712) 2023-01-10 [email protected] dart-lang/co19#1686. Expect runtime error in case of cast pattern (dart-lang/co19#1713) 2023-01-10 [email protected] Fixes dart-lang/co19#1688. record_A02_t09.dart. Fix typo (dart-lang/co19#1714) 2023-01-10 [email protected] Fixes dart-lang/co19#1689. relational_A03_t01.dart. Fix typo (dart-lang/co19#1715) 2023-01-10 [email protected] Fixes dart-lang/co19#1690. relational_A04_t04.dart. Fix typo (dart-lang/co19#1716) 2023-01-10 [email protected] Fixes dart-lang/co19#1691. relational_A05_t01.dart. Remove wrong checks (dart-lang/co19#1717) 2023-01-10 [email protected] Fixes dart-lang/co19#1692. Add missed 'const' statements (dart-lang/co19#1718) 2023-01-10 [email protected] Fixes dart-lang/co19#1693. switch_expression_A02_t01.dart. Fix typos (dart-lang/co19#1719) 2023-01-10 [email protected] Fixes dart-lang/co19#1694. switch_expression_A03_t05.dart. Fix return type (dart-lang/co19#1720) 2023-01-10 [email protected] Fixes dart-lang/co19#1695. switch_expression_A03_t12.dart. Add missed `abstract` keyword (dart-lang/co19#1721) 2023-01-10 [email protected] Fixes dart-lang/co19#1696. switch_expression_A04_t01.dart. Fix expected errors positions (dart-lang/co19#1722) 2023-01-10 [email protected] Fixes dart-lang/co19#1697. switch_expression_A06_t01.dart. Fix test errors and typos (dart-lang/co19#1723) 2023-01-10 [email protected] Fixes dart-lang/co19#1698. switch_expression_A06_t02.dart. Fix typo (dart-lang/co19#1724) 2023-01-10 [email protected] Fixes dart-lang/co19#1700. variable_A02_t02.dart. Expect additional errors (dart-lang/co19#1726) 2023-01-10 [email protected] Fixes dart-lang/co19#1701. variable_A02_t06.dart. Fix typos (dart-lang/co19#1727) 2023-01-10 [email protected] Fixes dart-lang/co19#1703. wildcards_A01_t02.dart. Don't use wildcard as a map key (dart-lang/co19#1729) 2023-01-10 [email protected] Fixes dart-lang/co19#1704. wildcards_A01_t03.dart. Use dynamic to avoid compile-time error (dart-lang/co19#1730) 2023-01-10 [email protected] Fixes dart-lang/co19#1705. Records/on_clauses_A02_t05.dart. Add missed error expectation (dart-lang/co19#1731) 2023-01-10 [email protected] Fixes dart-lang/co19#1706. Fix typos in map pattern tests (dart-lang/co19#1732) 2023-01-10 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/co19#1707) Change-Id: I59ffc2e275994159fe8807bc7f0b0900c65759db Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279002 Reviewed-by: Alexander Thomas <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.