Julia incorrect with function argument

Hi!
Please help me to understand whats wrong with julia logic.
The following code print out:

println(typeof(section))
>> CxxWrap.CxxWrapCore.CxxPtr{Main.CppTypes.ISection}

I wish to write function which take this (and i want to specify its type)
Which also print same (obviously)

function Eg(mat, T::Cdouble)
    println(typeof(mat))
end
>> CxxWrap.CxxWrapCore.CxxPtr{Main.CppTypes.ISection}

But if i add this type - julia will not compile

function Eg(mat :: CxxWrap.CxxWrapCore.CxxPtr{Main.CppTypes.ISection}, T::Cdouble)
    println(typeof(mat))
end

Is it correct? I place a type typed by julia.
I run julia through c++ binding and dont know the exact problem for this.

Sorry, im stupid. Found answer when writing this question.
Should add

using CxxWrap

But how to know that from julia embedding?
How to handle julia compile errors with embeddding?