Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect Broken ASTs rather than crashing. #117

Open
Keno opened this issue Jun 6, 2015 · 1 comment
Open

Detect Broken ASTs rather than crashing. #117

Keno opened this issue Jun 6, 2015 · 1 comment

Comments

@Keno
Copy link
Collaborator

Keno commented Jun 6, 2015

No description provided.

@nkottary
Copy link

nkottary commented Sep 3, 2015

This could be an example:
julia> cxx""" #include """
true

julia> cxx""" void foo (int bar) { std::cout<< "Bar is :" << bar << std::endl } """
In file included from :1:
__cxxjl_4.cpp:1:65: error: expected ';' after expression
void foo (int bar) { std::cout<< "Bar is :" << bar << std::endl }
^
;
true

julia> cxx""" void foo (int bar) { std::cout<< "Bar is :" << bar << std::endl; } """
__cxxjl_5.cpp:1:7: error: redefinition of 'foo'
void foo (int bar) { std::cout<< "Bar is :" << bar << std::endl; }
^
__cxxjl_4.cpp:1:7: note: previous definition is here
void foo (int bar) { std::cout<< "Bar is :" << bar << std::endl }
^
true

julia>

However,
julia> jl_foo(a) = @cxx foo(a)
jl_foo (generic function with 1 method)

julia> jl_foo(5)
Bar is: 5

julia>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants