Skip to content

support return types  #81

@mchristianl

Description

@mchristianl

Hi,

Thank you for this package to obtain a function's source code!

I am just starting out experimenting and found, that return type annotations might not be supported:

function f(x::Int64)
  return x*x + x
end
function g(x::Int64)::Int64
  return x*x + x
end
println("f = $(definition(String,which(f,(Int64,))))")
println("g = $(definition(String,which(g,(Int64,))))")

gives

f = ("function f(x::Int64)\n  return x*x + x\nend", 901)
g = nothing

would it be difficult to add this functionality?

kind regards,
Christian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions