GetFirefly/firefly

Cannot parse named inline type used as key for a map type

KronicDeth opened this issue · 1 comments

-type tuple_elements() :: #{ Key :: pos_integer() => type() }.

from https://github.com/lumen/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/lib/compiler/src/beam_types.hrl#L127

error: unrecognized token
    ┌─ /Users/runner/work/lumen/otp/lib/compiler/src/beam_types.hrl:127:34
    │
127 │ -type tuple_elements() :: #{ Key :: pos_integer() => type() }.
    │                                  ^^ expected: ")", "*", "+", ",", "-", ".", "..", ":=", ";", "=>", ">>", "]", "band", "bor", "bsl", "bsr", "bxor", "div", "rem", "when", "|", "}"

error: parsing failed

      Failed /Users/runner/work/lumen/otp/lib/compiler/src/beam_call_types.erl

Confirmed. No expected pointing at :: remain in the OTP build log.