From c28f8c07374493de31e5581dcd53ad99a2ff917a Mon Sep 17 00:00:00 2001 From: nsensfel Date: Mon, 29 Apr 2019 17:43:18 +0200 Subject: Dialyzer error, compiles, some issues w/ client. Dialyzer says: bnt_join_battle.erl:103: The created fun has no local return bnt_join_battle.erl:122: The call shr_inventory:ataxia_add_equipment(shr_equipment:unresolved(),shr_inventory:type()) does not have an opaque term of type shr_equipment:type() as 1st argument bnt_join_battle.erl:310: Function repair_join_battle/6 will never be called shr_inventory:ataxia_add_equipment(shr_equipment:unresolved(),shr_inventory:type()) is defined, though... Still some hiccups with what is sent to the client. --- src/shared/struct/inventory/shr_inventory.erl | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/shared/struct/inventory/shr_inventory.erl') diff --git a/src/shared/struct/inventory/shr_inventory.erl b/src/shared/struct/inventory/shr_inventory.erl index 884c213..0396b0a 100644 --- a/src/shared/struct/inventory/shr_inventory.erl +++ b/src/shared/struct/inventory/shr_inventory.erl @@ -273,12 +273,7 @@ default () -> glyphs = EmptySet }. --spec allows_equipment - ( - (shr_equipment:type()|shr_equipment:unresolved()), - type() - ) - -> boolean(). +-spec allows_equipment (shr_equipment:either(), type()) -> boolean(). allows_equipment (Eq, Inv) -> Weapons = Inv#inventory.weapons, Glyphs = Inv#inventory.glyphs, @@ -312,12 +307,7 @@ allows_equipment (Eq, Inv) -> ) ). --spec add_equipment - ( - (shr_equipment:type()|shr_equipment:unresolved()), - type() - ) - -> type(). +-spec add_equipment (shr_equipment:either(), type()) -> type(). add_equipment (Eq, Inv) -> Inv#inventory { @@ -360,7 +350,7 @@ add_equipment (Eq, Inv) -> -spec ataxia_add_equipment ( - (shr_equipment:type()|shr_equipment:unresolved()), + shr_equipment:either(), type() ) -> {type(), ataxic:basic()}. -- cgit v1.2.3-70-g09d2