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

Constant expression errors not reported #2

Open
asutton opened this issue Aug 7, 2017 · 0 comments
Open

Constant expression errors not reported #2

asutton opened this issue Aug 7, 2017 · 0 comments

Comments

@asutton
Copy link
Owner

asutton commented Aug 7, 2017

This function should yield an error when called.

immediate bool check() {
  int x = 3;
  class_info ci = reflexpr(x);  // ci is empty
  
  // const char* str = ci.name();
  compiler.print(ci.name());

However, the call to print() seems to eat any diagnostics resulting from invalid use of an empty reflection. Uncommenting the line above yields the correct error.

This may be related to the fact that print() is a void function.

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

1 participant