Skip to content

make 'throw foo' an expression #587

Closed
@DartBot

Description

@DartBot

This issue was originally filed by sammcca...@google.com


If throwStatement was an expression instead, this would allow:

() => throw new Exception("foo")
z = foo ? bar : throw new BazException()

If it was of static type ⊥ (like null) then these should be warning-free, too.

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions