Skip to content

Commit 380c44b

Browse files
committed
merge #134
1 parent ed10d57 commit 380c44b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/FixedSizeArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ end
8787

8888
macro fixed_vector(name, parent)
8989
esc(quote
90-
immutable $(name){S, T} <: $(parent){T}
90+
immutable $(name){S, T} <: $(parent){S, T}
9191
data::NTuple{S, T}
9292

9393
function (::Type{$(name){S, T}}){S, T}(x::NTuple{S,T})

test/fixed_size_arrays.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ const Mat2d = Mat{2,2, Float64, 4}
1515
const Mat3d = Mat{3,3, Float64, 9}
1616
const Mat4d = Mat{4,4, Float64, 16}
1717

18-
immutable RGB{T} <: FieldVector{T}
18+
immutable RGB{T} <: FieldVector{3, T}
1919
x::T
2020
y::T
2121
z::T
2222
end
23+
2324
RGB{T}(x::T) = RGB{T}(x, x, x)
2425
(::RGB{T}){T}(r, g, b) = RGB{T}(T(r), T(g), T(b))
2526
(::RGB{T}){T}(r::Real) = RGB(T(r), T(r), T(r))

0 commit comments

Comments
 (0)