dart-archive/angular_analyzer_plugin

Warn about void interpolation expressions

Opened this issue · 2 comments

IMHO, an issue should be reported by the analyzer when the static type of an interpolated expression is void as in the following example:

@Component(
  selector: 'example',
  template: '{{foo()}}',
)
class C {
  void foo() {}
}

cc @kwalrath

Nit: it won't be void unless you bind {{foo()}}, but yes, agreed! Same goes for [x]="voidResult()"

(Right! I've fixed the example.)