<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63432>63432</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MLIR] possible bug report
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
HahaLan97
</td>
</tr>
</table>
<pre>
Hi, dear developers of MLIR. I've been trying to build my own dialect and I'm using `ElementAttrInterface` in the file `include/mlir/IR/BuiltinAttributeInterfaces.td`. But when I build my own dialect, I always got an error like
```
no viable conversion from ::mlir::Type to ::mlir::ShapedType
```
and I think it may because the method definition from the line 180:
```
InterfaceMethod<[{
Returns the shaped type of the elements attribute.
}], "::mlir::ShapedType", "getShapedType", (ins), [{}], /*defaultImplementation=*/[{
return $_attr.getType();
}]>
```
I've tried to add a cast function behind and now the error is gone. Could you maybe please take a look at it?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE1vpDgQ_TXmUhoEdhrIgUMnPWhamrlk974qcAHeGBv5o6P-9yu7O9nRqrUICWw_13v1qmz0Xi2GqGeHF3Y4FRjDal3_A1f8iea5LUYrr_0PxfgrSEIHki6k7U7Og53h18_zWwlnxtsLwUhkILirMgsEC2NUWsJ2BfthQCrUNAVAIzN8g-gTjjXVd00bmXAMwZ1NIDfjRKypQBkIK8GsNCWYMpOOkhgfNq0c48P5jfHhJSodlEmb1RgDfUXwZZCsqUp4iQE-VjJwfqgoJXYG1B949bDYpBDIOetAq3di1YlVR9ZU9zcPjYWLwlETTNZcyHllDczObsDEkYlj1pf__rzulKz47_wfK-4k0-pDgmwShFWZd1ABNrzCSBNGT9mRjcJqJUialVHhizwtaWUI6q5KNI8if9nzK8dg4jXVvX25rcIbheiMz6F81gghpWDnPEW3SnnAT7vL-0YAYO2JHU7JTsb5_yTM-R2zUHgw3SnjGX_Og5u03-IOjB8lzRh1OG_7TQ0mB5g4MX5MgN_TuT8uZwWMP_2VhJcLhRtll4jEJ_pOJL4_du7W48GpZIoFlBIQJvQB5mimXIaRVmVk7nFjP26W5VZSqbUMlfBqo5ZwtTEVdSTYNWGqKr4TIGhr3wEDqMDEcKMtZC_ks3jGgvq66VpxEO3hUKx9K9q5qxtqa8SqrmjiDXIpxShFJ7ioC9Xziouq4XUtOBeHsuPIZ-oQu7qS4pnYU0UbKl1qfdlK65ZCeR-pb8ST4IXGkbT_vBZcn0Dfxrh49lRp5YP_d1tQQecLJN0G7HCC3Xqv0vkY4wKOdutCEZ3u1xB2nxoiFXJYVFjjWE52Y3xIwe6fb7uzf-eTOWRBnvEha_onAAD__yNEcys">