From df103301c3fecd7592d66f7ad6c6a3f56fe7cb52 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Wed, 8 Feb 2017 17:59:21 -0500 Subject: [PATCH] new inner constructor syntax ala #20308 --- test/dimensionful.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dimensionful.jl b/test/dimensionful.jl index e9dbd04664429..58c3b12142ae4 100644 --- a/test/dimensionful.jl +++ b/test/dimensionful.jl @@ -5,8 +5,8 @@ # represents a quantity in furlongs^p immutable Furlong{p,T<:Number} <: Number val::T - Furlong(v::Number) = new(v) - Furlong(x::Furlong{p}) = new(x.val) + Furlong{p,T}(v::Number) where {p,T} = new(v) + Furlong{p,T}(x::Furlong{p}) where {p,T} = new(x.val) end Furlong{T<:Number}(x::T) = Furlong{1,T}(x) (::Type{T}){p,T}(x::Furlong{p,T}) = x.val