Skip to content

Commit 6c8c4a4

Browse files
committed
Document subtypes
1 parent 34a0543 commit 6c8c4a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/types.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object is stored in the `:dimensions` field. These fields can be accessed with
3636
abstract type AbstractQuantity{T,D} end
3737

3838
"""
39-
Dimensions{R} <: AbstractDimensions{R}
39+
Dimensions{R<:Real} <: AbstractDimensions{R}
4040
4141
A type representing the dimensions of a quantity, with each
4242
field giving the power of the corresponding dimension. For
@@ -80,7 +80,7 @@ end
8080
const DEFAULT_DIM_TYPE = Dimensions{DEFAULT_DIM_BASE_TYPE}
8181

8282
"""
83-
Quantity{T,D} <: AbstractQuantity{T,D}
83+
Quantity{T,D<:AbstractDimensions} <: AbstractQuantity{T,D}
8484
8585
Physical quantity with value `value` of type `T` and dimensions `dimensions` of type `D`.
8686
For example, the velocity of an object with mass 1 kg and velocity

0 commit comments

Comments
 (0)