Skip to content

Parse symbolic names in ANN type correctly with otycon

Ryan Scott requested to merge wip/T19374 into master

This adds a new otycon production to the parser that allows for type constructor names that are either alphanumeric (tycon) or symbolic (tyconsym), where the latter must be parenthesized appropriately. otycon is much like the existing oqtycon production, except that it does not permit qualified names. The parser now uses otycon to parse type constructor names in ANN type declarations, which fixes #19374 (closed).

To make sure that all of this works, I added three test cases:

  • should_compile/T19374a: the original test case from #19374 (closed)
  • should_fail/T19374b: a test that makes sure that an ANN with a qualified name fails to parse
  • should_fail/T19374c: a test that makes sure that an ANN type with a qualified name fails to parse

Merge request reports