Fix a bug in toy LateLowering where a type conversion was using 'cast' instead of 'dyn_cast'.

--

PiperOrigin-RevId: 249325111
This commit is contained in:
River Riddle 2019-05-21 14:24:48 -07:00 committed by Mehdi Amini
parent da37b0a536
commit 64a21667a9
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ protected:
/// Convert a Toy type, this gets called for block and region arguments, and
/// attributes.
Type convertType(Type t) override {
if (auto array = t.cast<toy::ToyArrayType>())
if (auto array = t.dyn_cast<toy::ToyArrayType>())
return array.toMemref();
return t;
}