我是朱莉娅的新手,所以这可能是微不足道的.
我在一个看起来像的模块中有一个函数定义(使用URIParser):
function add!(graph::Graph,
subject::URI,
predicate::URI,
object::URI)
...
end
Run Code Online (Sandbox Code Playgroud)
在模块之外,我打电话给:
add!(g, URIParser.URI("http://test.org/1"), URIParser.URI("http://test.org/2"), URIParser.URI("http://test.org/1"))
Run Code Online (Sandbox Code Playgroud)
这给了我这个错误:
ERROR: no method add!(Graph,URI,URI,URI)
in include at boot.jl:238
in include_from_node1 at loading.jl:114
at /Users/jbaran/src/RDF/src/RDF.jl:79
Run Code Online (Sandbox Code Playgroud)
奇怪的.因为当我能看到匹配的签名时:
julia> methods(RDF.add!)
# 4 methods for generic function "add!":
add!(graph::Graph,subject::URI,predicate::URI,object::Number) at /Users/jbaran/src/RDF/src/RDF.jl:29
add!(graph::Graph,subject::URI,predicate::URI,object::String) at /Users/jbaran/src/RDF/src/RDF.jl:36
add!(graph::Graph,subject::URI,predicate::URI,object::URI) at /Users/jbaran/src/RDF/src/RDF.jl:43
add!(graph::Graph,statement::Statement) at /Users/jbaran/src/RDF/src/RDF.jl:68
Run Code Online (Sandbox Code Playgroud)
起初我以为这是我对object :: Union(...)的使用,但即使我用Number,String和URI定义了三个函数,我也会遇到这个错误.
有什么明显的东西让我失踪吗?顺便说一下,我正在使用Julia 0.2.1 x86_64-apple-darwin12.5.0.
谢谢,
金
julia ×1