-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework fallible constructors (#1491)
* Remove unused trait `InitializerReturnType` * WIP experimenting with static constructor return types * WIP * WIP generating metadata at compile time * WIP using constructor result type * Use generated method for metadata * Generate constructor info using static types * WIP restoring dispatch * WIP adding metadata test to ui test * Fix match as_result * Attempt to infer result type * Constructor dispatch compiles, remove metadata syntax stuff * Fmt * Remove unnecessary braces * Fix up execution for results * Fix up tests * Remove printlns * Explicitly set reverted flag * ReturnTypeSpec accurately reflects ABI * Polished refactor for constructor return type (#1500) * revert instantiating when error * display name + correct return typ when Self * fix dereferencing issue * UI test error variant + cleanup * cargo fmt * cargo fmt * fix another reference issue * fix spec contract test Co-authored-by: Andrew Jones <[email protected]> * explicit prelude + fixing test error messages (#1503) * Add constructor to ReturnFlags to not require Default trait impl * Only invoke return_value for fallible constructors * Add e2e fallible constructor value tests * Fmt * Add some reflection tests for constructors returning an error * Check reflection for return types in UI tests * Check reflection in example * Fmt * Add test for fallible constructor succeeding * Add test for fallible constructor failing * Remove unused message * Fully qualify Ok(()) Co-authored-by: German <[email protected]>
- Loading branch information
Showing
19 changed files
with
589 additions
and
342 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.