Skip to content
Commit 97505013 authored by Geoffrey Martin-Noble's avatar Geoffrey Martin-Noble Committed by Mehdi Amini
Browse files

Make getRank abort for unranked type

    This better matches the other methods in ShapedType which only make sense for ranked types. There's now an explicit hasRank for checking the rank. Actual call sites rarely used the "-1" sentinel to combine checking for rankedness and checking that rank is a certain value. And in most cases they should actually be checking for rankedness at a higher level using type predicates. Using an explicit method is clearer than a sentinel anyway.

--

PiperOrigin-RevId: 250720853
parent 29073d99
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment