<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/147020>147020</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir] Error message for optional properties is confusing
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
peledins-zimperium
</td>
</tr>
</table>
<pre>
I had to look up source code for this error message:
```
return emitError(loc, "only properties with default values "
"that can be optionally parsed "
"can be used to anchor an optional group");
```
to understand that "optionally parsed" means that it must have the optional parser enabled.
I think a better error message would be:
```
return emitError(loc, "only properties with `defaultValue` "
"that also have `optionalParser` "
"can be used to anchor an optional group");
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysk81u5CoQhZ8Gb0pp0dj4Z-FF5yYtZXdXswdTsZlgsKDoKPP0I5yedJLtjGXJkjmHOvWVSqVkZ484MnnP5EOlMi0hjhs6NNanu1923TDavFY6mLfxCRZlgAK4EF4gb5BCjhPCFAzCc4hAi02AMYYIK6akZmT1ifETa_n15Sf4eCJSjh5wtfRYPEz0LkxM_AdMiODdG2wxbBjJYoJXSwsYfFbZEVyUy5iKrFzIhKBFEUzKg0YIG9nglSt-FROaT7qrJJe_FED5aQkRlP8wwRxD3opBDKy-_5adAmRvMCZS3sBetET9XpAJASsqn94llmDNiWBRFwRabgnf5RHQK-3QHEo1fnoqGP0LKNBIVI4_A4XXkJ0B_Y_JspZf4f4obFnLv9NVLoX3FljL_3Tw_97AV_XfMK7MWJuhHlSF47GTx_Y4tEJWy2j6WnatxE6rXmttpoYPU8fN0A9tg_WxsqPgQvKON3zgXMgDb3kne256LbWpUbKG46qsOzh3WQ8hzpVNKeN4bDoueOWURpf2RRBidTaWfPKhimPR3-k8J9ZwZxOl2w1kye3LsxvkAzx-GVVZidusb8Rtgin455ysn6sc3bgQbakMVJyZOM-WlqwPU1iZOJda18_dFsNPnIiJ8x49MXG-pr-M4ncAAAD___qSOBE">