@NamedTuple fails

Hi there,

I copied this line:

@NamedTuple{a::Int, b::String}

from the manual to the REPL and instead of the expected

NamedTuple{(:a, :b),Tuple{Int64,String}}

it returned an error:

ERROR: syntax: invalid macro usage "@(NamedTuple{a::Int, b::String})"

I also tried just typing

@NamedTuple

and received an

ERROR: LoadError: UndefVarError: @NamedTuple not defined

What did I do wrong?

Thanks heartily,
Inbar

What version of Julia are you using? You can type versioninfo() at the REPL to find out.

Oh god. It’s 1.0.4.

3 Likes