Skip to content

Commit

Permalink
fixes #21731; fixes #21537; disable warnBareExcept by default [back…
Browse files Browse the repository at this point in the history
…port] (#21728)

* disable warnBareExcept for default

* fixes a typo
  • Loading branch information
ringabout authored Apr 26, 2023
1 parent 0032322 commit 69c193e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion changelogs/changelog_2_0_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
`foo` had type `proc ()` were assumed by the compiler to mean `foo(a, b, proc () = ...)`.
This behavior is now deprecated. Use `foo(a, b) do (): ...` or `foo(a, b, proc () = ...)` instead.

- If no exception or any exception deriving from Exception but not Defect or CatchableError given in except, a `warnBareExcept` warning will be triggered.
- When `--warning[BareExcept]:on` is enabled, if no exception or any exception deriving from Exception but not Defect or CatchableError given in except, a `warnBareExcept` warning will be triggered.

- The experimental strictFuncs feature now disallows a store to the heap via a `ref` or `ptr` indirection.

Expand Down
2 changes: 1 addition & 1 deletion compiler/lineinfos.nim
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ type
TNoteKinds* = set[TNoteKind]

proc computeNotesVerbosity(): array[0..3, TNoteKinds] =
result[3] = {low(TNoteKind)..high(TNoteKind)} - {warnObservableStores, warnResultUsed, warnAnyEnumConv}
result[3] = {low(TNoteKind)..high(TNoteKind)} - {warnObservableStores, warnResultUsed, warnAnyEnumConv, warnBareExcept}
result[2] = result[3] - {hintStackTrace, hintExtendedContext, hintDeclaredLoc, hintProcessingStmt}
result[1] = result[2] - {warnProveField, warnProveIndex,
warnGcUnsafe, hintPath, hintDependency, hintCodeBegin, hintCodeEnd,
Expand Down

0 comments on commit 69c193e

Please sign in to comment.