When using a material autocomplete (from angular-material 7.3.7), I always get an inspection error from IntelliJ. Code example:
<form>
<mat-form-field>
<input type="text" matInput [formControl]="myControl" [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete">
<mat-option>foobar</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
The inspection error as shown from IntelliJ:
Specifically, the part [matAutocomplete]="auto"
triggers an inspection error of the type AngularInvalidExpressionResultType
.
Since the example is directly copied from angular-material and also custom code shows the same error, I'm starting to wonder if this is really an error or just a bug in the inspection.
The [autocomplete]
-Input expects a type MatAutocomplete
, which is provided, and so the error description doesn't even make sense.
Is this a bug in IntelliJ?
My IntelliJ version: IntelliJ IDEA 2019.1.3 (Ultimate Edition) / Build #IU-191.7479.19, built on May 28, 2019