# String changed behaviour in Julia 1.1

**URL:** <https://discourse.julialang.org/t/string-changed-behaviour-in-julia-1-1/21561>\
**Category:** General Usage\
**Created:** [March 7, 2019, 9:35am UTC](https://discourse.julialang.org/t/string-changed-behaviour-in-julia-1-1/21561 "2019-03-07T09:35:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [March 7, 2019, 9:35am UTC](https://discourse.julialang.org/t/string-changed-behaviour-in-julia-1-1/21561/1 "2019-03-07T09:35:17Z")

</div>

`string(String[])` seems to be a no-op in Julia 1.1.  
In 1.0.3. this worked as intended for me (see below).  
Was this change intentional?

Note that `string.(String[])!=string(String[])` in v1.0.3

It is breaking some code of mine (which expects that the “string” function returns a string)

```julia
julia> versioninfo()
Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
  JULIA_BINDIR = C:\Julia-1.X\bin\
  JULIA_EDITOR = "C:\Program Files (x86)\Notepad++\notepad++.exe"
  JULIA_HOME = C:\Julia-1.X\bin\

julia> string(String[])
"String[]"

julia> string(Int32[])
"Int32[]"

julia> string(Float64[])
"Float64[]"

```

```julia
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_BINDIR = C:\Julia-1.1.0\bin\
  JULIA_EDITOR = "C:\Program Files (x86)\Notepad++\notepad++.exe"
  JULIA_HOME = C:\Julia-1.1.0\bin\

julia> string(Int32[])
"Int32[]"

julia> string(String[])
0-element Array{String,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:** [March 7, 2019, 9:42am UTC](https://discourse.julialang.org/t/string-changed-behaviour-in-julia-1-1/21561/2 "2019-03-07T09:42:28Z")

</div>

Yep, the infamous [Pkg does a nonsensical type piracy. · Issue #1034 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/1034), see also [Piracy in the StdLibs · Issue #30945 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/30945#issuecomment-460065670).

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [March 7, 2019, 9:50am UTC](https://discourse.julialang.org/t/string-changed-behaviour-in-julia-1-1/21561/3 "2019-03-07T09:50:02Z")

</div>

Thanks.  
I gather this will be fixed in 1.2 (or actually might already be fixed on nightly), correct?  
Actually my tests on the windows nightly fail, while my tests on the linux nightly succeed.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 7, 2019, 10:02am UTC](https://discourse.julialang.org/t/string-changed-behaviour-in-julia-1-1/21561/4 "2019-03-07T10:02:23Z")

</div>

> [@bernhard](#):
>
> I gather this will be fixed in 1.2

Yes, and 1.1.1.

> [@bernhard](#):
>
> already be fixed on nightly

Yes, as of [Bump Pkg to 1.2-alpha-ish. by fredrikekre · Pull Request #31116 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/31116)
