-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: remove inline sum types completely
- Loading branch information
1 parent
59c8f6b
commit a190415
Showing
8 changed files
with
9 additions
and
146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
vlib/v/parser/tests/inline_sum_type_option_err.vv:1:11: warning: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
vlib/v/parser/tests/inline_sum_type_option_err.vv:1:11: error: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
1 | fn foo() ?string | int { | ||
| ~~~~~~ | ||
2 | return 0 | ||
3 | } | ||
vlib/v/parser/tests/inline_sum_type_option_err.vv:1:10: error: an inline sum type cannot be an Option | ||
1 | fn foo() ?string | int { | ||
| ~~~~~~~~~~~~~ | ||
2 | return 0 | ||
3 | } |
39 changes: 2 additions & 37 deletions
39
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,7 @@ | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:4:6: warning: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
2 | | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:4:6: error: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
2 | | ||
3 | struct Foo { | ||
4 | bar int|string|token.Pos|bool|u32 | ||
| ~~~ | ||
5 | } | ||
6 | | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:4:6: warning: an inline sum type expects a maximum of 3 types (5 were given) | ||
2 | | ||
3 | struct Foo { | ||
4 | bar int|string|token.Pos|bool|u32 | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
5 | } | ||
6 | | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:7:12: warning: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
5 | } | ||
6 | | ||
7 | fn foo(arg int|string|token.Pos|bool|u32) int|string|token.Pos|bool|u32 { | ||
| ~~~ | ||
8 | return 1 | ||
9 | } | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:7:12: warning: an inline sum type expects a maximum of 3 types (5 were given) | ||
5 | } | ||
6 | | ||
7 | fn foo(arg int|string|token.Pos|bool|u32) int|string|token.Pos|bool|u32 { | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
8 | return 1 | ||
9 | } | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:7:43: warning: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
5 | } | ||
6 | | ||
7 | fn foo(arg int|string|token.Pos|bool|u32) int|string|token.Pos|bool|u32 { | ||
| ~~~ | ||
8 | return 1 | ||
9 | } | ||
vlib/v/parser/tests/inline_sum_type_return_type_too_many_variants.vv:7:43: warning: an inline sum type expects a maximum of 3 types (5 were given) | ||
5 | } | ||
6 | | ||
7 | fn foo(arg int|string|token.Pos|bool|u32) int|string|token.Pos|bool|u32 { | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
8 | return 1 | ||
9 | } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
vlib/v/parser/tests/option_sum_type_return_err.vv:1:22: warning: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
vlib/v/parser/tests/option_sum_type_return_err.vv:1:22: error: inline sum types have been deprecated and will be removed on January 1, 2023 due to complicating the language and the compiler too much; define named sum types with `type Foo = Bar | Baz` instead | ||
1 | fn option_sumtype() ?string | int { | ||
| ~~~~~~ | ||
2 | return 0 | ||
3 | } | ||
vlib/v/parser/tests/option_sum_type_return_err.vv:1:21: error: an inline sum type cannot be an Option | ||
1 | fn option_sumtype() ?string | int { | ||
| ~~~~~~~~~~~~~ | ||
2 | return 0 | ||
3 | } |
This file was deleted.
Oops, something went wrong.