From 695a54159c86f7ebd350ca362c1d265068beb095 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Wed, 6 Oct 2021 23:44:10 +0200 Subject: [PATCH] Fix dialyzer errors --- lib/rdf.ex | 6 ++++-- lib/rdf/star/statement.ex | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/rdf.ex b/lib/rdf.ex index a1d1f54..6f00668 100644 --- a/lib/rdf.ex +++ b/lib/rdf.ex @@ -265,7 +265,8 @@ defmodule RDF do defdelegate statement(tuple, property_map \\ nil), to: Statement, as: :new defdelegate coerce_subject(subject, property_map \\ nil), to: Statement - defdelegate coerce_predicate(predicate, property_map \\ nil), to: Statement + defdelegate coerce_predicate(predicate), to: Statement + defdelegate coerce_predicate(predicate, property_map), to: Statement defdelegate coerce_object(object, property_map \\ nil), to: Statement defdelegate coerce_graph_name(graph_name), to: Statement else @@ -282,7 +283,8 @@ defmodule RDF do defdelegate statement(tuple, property_map \\ nil), to: Statement, as: :new defdelegate coerce_subject(subject), to: Statement - defdelegate coerce_predicate(predicate, property_map \\ nil), to: Statement + defdelegate coerce_predicate(predicate), to: Statement + defdelegate coerce_predicate(predicate, property_map), to: Statement defdelegate coerce_object(object), to: Statement defdelegate coerce_graph_name(graph_name), to: Statement end diff --git a/lib/rdf/star/statement.ex b/lib/rdf/star/statement.ex index 65588a7..7f33dbf 100644 --- a/lib/rdf/star/statement.ex +++ b/lib/rdf/star/statement.ex @@ -23,6 +23,8 @@ defmodule RDF.Star.Statement do {coercible_subject(), coercible_predicate(), coercible_object(), coercible_graph_name()} | {coercible_subject(), coercible_predicate(), coercible_object()} + @type term_mapping :: RDF.Statement.term_mapping() + @doc """ Creates a `RDF.Star.Triple` or `RDF.Star.Quad` with proper RDF values. @@ -71,8 +73,8 @@ defmodule RDF.Star.Statement do def coerce_subject({_, _, _} = triple, property_map), do: Triple.new(triple, property_map) def coerce_subject(subject, _), do: RDF.Statement.coerce_subject(subject) - defdelegate coerce_predicate(coercible_predicate), to: RDF.Statement - defdelegate coerce_predicate(term, context), to: RDF.Statement + defdelegate coerce_predicate(predicate), to: RDF.Statement + defdelegate coerce_predicate(predicate, property_map), to: RDF.Statement @doc false @spec coerce_object(coercible_object, PropertyMap.t() | nil) :: object