Skip to content

Elvis operator in expressions: ?. #791

@mhevery

Description

@mhevery

Currently a.b.c will thrown an error in expression if a is null. To suppress null dereferencing we should support a?.b.c which would short circuit further evaluation if a is null. In this way we could have explicit notation which would show which values could be null.

Syntax to fallow dart proposal: https://github.com/gbracha/nullAwareOperators/blob/master/README.md

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions