From 2938bf85c76ec93215544cb555dd89b30af0f94f Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 14 Mar 2022 16:28:38 +0100 Subject: [PATCH] Fix missing code in README.md. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf1e4e6..0ec21bf 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,8 @@ YellowFruits.Banana = 0 `@enumx` also allows for duplicate values: ```julia +julia> @enumx Fruit Apple=1 Banana=1 + julia> Fruit.T Enum type Fruit.T <: Enum{Int32} with 2 instances: Fruit.Apple = 1 @@ -98,7 +100,8 @@ Other than that, functionality should be comparable to `Base.@enum`: UInt8 ``` - - Specifying values (if not specified, defaults to the value of the previous instance + 1): + - Specifying values with literals or expressions (if not specified, defaults to the value + of the previous instance + 1): ```julia julia> @enumx Fruit Apple=4 Banana=(1 + 5) Orange