# SimpleTraits error in Julia 0.6

**URL:** https://discourse.julialang.org/t/simpletraits-error-in-julia-0-6/10109
**Category:** General Usage
**Created:** [April 1, 2018, 10:48pm UTC](https://discourse.julialang.org/t/simpletraits-error-in-julia-0-6/10109 "2018-04-01T22:48:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tk3369](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tk3369/32/2824_2.png) [@tk3369](https://discourse.julialang.org/u/tk3369)
#### Post date: [April 1, 2018, 10:48pm UTC](https://discourse.julialang.org/t/simpletraits-error-in-julia-0-6/10109/1 "2018-04-01T22:48:36Z")

</div>

Is [SimpleTraits](https://github.com/mauro3/SimpleTraits.jl) still supported in 0.6? This simple code from the test suite fails. Note that it works fine on Julia 0.7.

```julia
julia> using SimpleTraits

julia> @traitdef Tr1{X}

julia> @traitimpl Tr1{Integer}

julia> const trait = SimpleTraits.trait
trait (generic function with 11 methods)

julia> trait(Tr1{Int})
Tr1{Int64}

julia> @traitfn f(x::X) where {X; Tr1{X}} = 1 # def 1
ERROR: MethodError: no method matching start(::Void)
Closest candidates are:
  start(::SimpleVector) at essentials.jl:258
  start(::Base.MethodList) at reflection.jl:560
  start(::ExponentialBackOff) at error.jl:107
  ...

```

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [April 3, 2018, 7:13am UTC](https://discourse.julialang.org/t/simpletraits-error-in-julia-0-6/10109/2 "2018-04-03T07:13:42Z")

</div>

> [@tk3369](#):
>
> `@traitfn f(x::X) where {X; Tr1{X}} = 1 # def 1`

Sorry, but the `where` function syntax is not supported in Julia 0.6 due to the `{X; Tr{X}}` not parsing as needed: [where-syntax accepts ; as separator in 0.6 · Issue #23211 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/23211). Note though that the old function syntax still works in 0.7, but of course throws deprecation warnings.

---

<div class="post-metadata">

### Author: ![tk3369](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tk3369/32/2824_2.png) [@tk3369](https://discourse.julialang.org/u/tk3369)
#### Post date: [April 3, 2018, 7:40am UTC](https://discourse.julialang.org/t/simpletraits-error-in-julia-0-6/10109/3 "2018-04-03T07:40:30Z")

</div>

Thanks, I have found examples from the [old README file](https://github.com/mauro3/SimpleTraits.jl/commit/5c69ca5c9423342d43cbc44dac597912630f28c3#diff-04c6e90faac2675aa89e2176d2eec7d8).

```julia
@traitfn f{X; Tr1{X}}(x::X) = 1

```

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [April 3, 2018, 8:31am UTC](https://discourse.julialang.org/t/simpletraits-error-in-julia-0-6/10109/4 "2018-04-03T08:31:39Z")

</div>

Yep, this was pretty hidden. I now added a link back to the last 0.6 version to the README: [https://github.com/mauro3/SimpleTraits.jl/tree/master#manual](https://github.com/mauro3/SimpleTraits.jl/tree/master#manual).
