Thank you :)

Avik Sengupta於 2015年4月22日星期三 UTC+8下午4時33分06秒寫道:
>
> You are using a very new Julia 0.4 build. So this is due to the recent 
> Tuple changes. tuple-types are now no longer declared as tuples of types, 
> they have a specific new syntax : Type{T, S} etc...  See 
> *https://github.com/JuliaLang/julia/pull/10380 
> <https://github.com/JuliaLang/julia/pull/10380> *
>
> So your code will work with the following: 
>
> julia> typealias Bar Tuple{Function, Function}
> Tuple{Function,Function}
>
> julia> f(bar::Bar) = 1
> f (generic function with 1 method)
>
> julia> f( (sin, cos) )
> 1
>
>
> On Wednesday, 22 April 2015 07:44:36 UTC+1, Miao Yang wrote:
>>
>> I don't know how to describe my problem, so let me past the code.
>>
>> ```
>>
>> julia> typealias Foo  (Function, Function)
>> (Function,Function)
>>
>> julia> f(foo::Foo) = 1
>> ERROR: ArgumentError: invalid type for argument foo in method definition 
>> for f at none:1
>>
>>
>> ```
>>
>> The Julia version is ` Version 0.4.0-dev+4328 `
>>
>> And these works recently ...
>>
>>
>>

Reply via email to