Markus Westerlind b69e679d5b fix: Don't accidentally cast a reduce action to usize
This caused panics in certain error recovery scenarios as a reduce action represented by a negative number would get casted to `usize` which then caused an index out of bounds panic.

The added tests were extracted and minimized from [gluon's grammar](abd06a4f6e/parser/src/grammar.lalrpop) with the test case below being a minimal reproduction.

Panicking
```
type Test = a ->
```

Valid expression
```
type Test = a -> a
in 1
```
2017-01-28 16:22:37 +01:00
..
2016-03-22 04:42:18 -04:00
2016-03-22 04:42:18 -04:00