Skip to content

Constant expression errors not reported #2

@asutton

Description

@asutton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions