Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Enable and fix new strict analysis options #131

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
include: package:lints/recommended.yaml

analyzer:
language:
strict-casts: true
strict-inference: true
2 changes: 1 addition & 1 deletion lib/src/arena.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ R withZoneArena<R>(R Function() computation,
/// The current arena must not be accessed by code which is not running inside
/// a zone created by [withZoneArena].
Arena get zoneArena {
final List<Arena>? arenaHolder = Zone.current[#_arena];
final arenaHolder = Zone.current[#_arena] as List<Arena>?;
if (arenaHolder == null) {
throw StateError('Not inside a zone created by `useArena`');
}
Expand Down