From 531a9fbfc658349907e6e6e0f7411b5b08a2c333 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sun, 25 Jun 2017 05:35:51 +0200 Subject: [PATCH 1/2] test shadowing function from base #11723 --- test/misc.jl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/misc.jl b/test/misc.jl index 28612a37ab2bb..77bf2eda5af27 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -794,3 +794,21 @@ end # module # @test @test_warn "A{T}(x::S) where {T, S} is deprecated, use f() instead." A{Int}(1.) # @test @test_nowarn A{Int}(1.) end + +str = """ +if true # required to exhibit bug + upper = ones(4) + lower = ones(4) + + # WARNING: imported binding overwritten + # required to exhibit bug + diag = ones(5) + + A = Tridiagonal(lower,diag,upper) + + for i=1:10 # required to exhibit bug + end +end""" + +cmd = `$(Base.julia_cmd()) -e $str` +@test success(cmd) From dc5fdad5314a5895e843db3b65001fa42ac07f29 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sun, 25 Jun 2017 08:27:07 +0200 Subject: [PATCH 2/2] no startup file --- test/misc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/misc.jl b/test/misc.jl index 77bf2eda5af27..75b3a80d0bbca 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -810,5 +810,5 @@ if true # required to exhibit bug end end""" -cmd = `$(Base.julia_cmd()) -e $str` +cmd = `$(Base.julia_cmd()) --startup-file=no -e $str` @test success(cmd)