Skip to content

Commit

Permalink
fixes enum capitalization (#24105)
Browse files Browse the repository at this point in the history
* fixes enum capitalization

This brings the example in the `instances` docstring in line with the naming convention used elsewhere in the enum docs. See #19506

* more enum consistency
  • Loading branch information
ssfrr authored and fredrikekre committed Oct 12, 2017
1 parent bb11e72 commit 0504584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions base/Enums.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ end
@noinline enum_argument_error(typename, x) = throw(ArgumentError(string("invalid value for Enum $(typename): $x")))

"""
@enum EnumName[::BaseType] EnumValue1[=x] EnumValue2[=y]
@enum EnumName[::BaseType] value1[=x] value2[=y]
Create an `Enum{BaseType}` subtype with name `EnumName` and enum member values of
`EnumValue1` and `EnumValue2` with optional assigned values of `x` and `y`, respectively.
`value1` and `value2` with optional assigned values of `x` and `y`, respectively.
`EnumName` can be used just like other types and enum member values as regular values, such as
# Examples
Expand Down
6 changes: 3 additions & 3 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,10 @@ enumerated types (see `@enum`).
# Example
```jldoctest
julia> @enum Colors Red Blue Green
julia> @enum Color red blue green
julia> instances(Colors)
(Red::Colors = 0, Blue::Colors = 1, Green::Colors = 2)
julia> instances(Color)
(red::Color = 0, blue::Color = 1, green::Color = 2)
```
"""
function instances end
Expand Down

2 comments on commit 0504584

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job:

NanosoldierError: failed to run benchmarks against primary commit: stored type BenchmarkTools.ParametersPreV006 does not match currently loaded type

Logs and partial data can be found here
cc @ararslan

Please sign in to comment.