-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow empty enum with non-empty mixins
- Loading branch information
1 parent
e08012c
commit 29ee927
Showing
5 changed files
with
36 additions
and
4 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
2 changes: 2 additions & 0 deletions
2
...sources/software/amazon/smithy/model/errorfiles/validators/mixins/empty-enum-mixin.errors
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[ERROR] smithy.example#EmptyEnumMixin: enum must have at least one entry | Model | ||
[ERROR] smithy.example#EmptyEnum: Cannot apply mixin to smithy.example#EmptyEnum: smithy.example#EmptyEnumMixin not found | Model |
8 changes: 8 additions & 0 deletions
8
...sources/software/amazon/smithy/model/errorfiles/validators/mixins/empty-enum-mixin.smithy
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
@mixin | ||
enum EmptyEnumMixin {} | ||
|
||
enum EmptyEnum with [EmptyEnumMixin] {} |
Empty file.
10 changes: 10 additions & 0 deletions
10
...ces/software/amazon/smithy/model/errorfiles/validators/mixins/non-empty-enum-mixin.smithy
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
@mixin | ||
enum NonEmptyEnumMixin { | ||
VALUE = "value" | ||
} | ||
|
||
enum NonEmptyEnum with [NonEmptyEnumMixin] {} |