Attention is currently required from: pespin. fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38297?usp=email )
Change subject: s1gw_metrics: more precise type hints ...................................................................... Patch Set 2: (1 comment) File src/s1gw_metrics.erl: https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38297/comment/04631954_782fe4ce?usp=email : PS2, Line 85: -type counter() :: [ctr | _]. > can you explain this to me? it kind of matches tokens starting with ctr? Yes, exactly. It's basically the usual `[Head | Tail]` form, letting dialyzer know that the `Head` shall be `ctr` for counters and `gauge` for gauges. Try this in erlang shell: ```erlang 6> [ctr | _] = [ctr, 1, 2, 3]. [ctr,1,2,3] 7> [ctr | _] = [gauge, 1, 2, 3]. ** exception error: no match of right hand side value [gauge,1,2,3] ``` -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38297?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I36eaa5e04037e165e43eb960c541f967c394a2ea Gerrit-Change-Number: 38297 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Comment-Date: Thu, 26 Sep 2024 14:07:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]>
