Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #27554, deprecate try without catch or finally #27559

Merged
merged 1 commit into from
Jun 15, 2018
Merged

Conversation

JeffBezanson
Copy link
Sponsor Member

fix #27554

@JeffBezanson JeffBezanson added parser Language parsing and surface syntax deprecation This change introduces or involves a deprecation triage This should be discussed on a triage call labels Jun 13, 2018
@ararslan
Copy link
Member

Looks like you'll need

diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl
index 4fa283e..b937bd4 100644
--- a/stdlib/LibGit2/test/libgit2.jl
+++ b/stdlib/LibGit2/test/libgit2.jl
@@ -2694,6 +2694,7 @@ mktempdir() do dir
                 # In some environments, namely Macs, the hostname "macbook.local" is bound
                 # to the external address while "macbook" is bound to the loopback address.
                 pushfirst!(hostnames, replace(gethostname(), r"\..*$" => ""))
+            catch
             end
 
             loopback = ip"127.0.0.1"
diff --git a/stdlib/SHA/test/runtests.jl b/stdlib/SHA/test/runtests.jl
index eee0c26..63a333b 100644
--- a/stdlib/SHA/test/runtests.jl
+++ b/stdlib/SHA/test/runtests.jl
@@ -278,6 +278,7 @@ for f in sha_funcs
         f(UInt32[0x23467, 0x324775])
         warn("Non-UInt8 Arrays should fail")
         nerrors += 1
+    catch
     end
 end
 
@@ -289,4 +290,4 @@ if nerrors == 0
 else
     println("Failed with $nerrors failures")
 end
-@test nerrors == 0
\ No newline at end of file
+@test nerrors == 0
diff --git a/stdlib/SparseArrays/test/sparse.jl b/stdlib/SparseArrays/test/sparse.jl
index 909ce84..d331576 100644
--- a/stdlib/SparseArrays/test/sparse.jl
+++ b/stdlib/SparseArrays/test/sparse.jl
@@ -1065,11 +1065,11 @@ end
 
     A = Matrix{Int}(I, 0, 0)
     S = sparse(A)
-    iA = try argmax(A) end
-    iS = try argmax(S) end
+    iA = try argmax(A); catch; end
+    iS = try argmax(S); catch; end
     @test iA === iS === nothing
-    iA = try argmin(A) end
-    iS = try argmin(S) end
+    iA = try argmin(A); catch; end
+    iS = try argmin(S); catch; end
     @test iA === iS === nothing
 end

@StefanKarpinski
Copy link
Sponsor Member

Triage is in favor.

@StefanKarpinski StefanKarpinski added this to the 0.7 milestone Jun 14, 2018
@StefanKarpinski StefanKarpinski removed the triage This should be discussed on a triage call label Jun 14, 2018
@JeffBezanson JeffBezanson merged commit 228e7c6 into master Jun 15, 2018
@JeffBezanson JeffBezanson deleted the jb/emptycatch branch June 15, 2018 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

try without catch should not catch
3 participants