Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
force the contexts values type
  • Loading branch information
rxlabz committed Oct 30, 2020
commit d8e69916f1a46095d5e445a1433a3beac2d757c4
6 changes: 5 additions & 1 deletion dart/lib/src/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class Scope {

Contexts get contexts => _contexts;

void setContexts(String key, dynamic value) {
void setContexts(String key, Object value) {
// TODO replace all assertions with ArgumentError ?
assert(key != null && value != null);
assert(value is num || value is bool || value is String);

_contexts[key] = value;
}

Expand Down