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

StackOverflowException in XLargeTest#test011() #1177

Closed
wants to merge 1 commit into from

Conversation

jarthana
Copy link
Member

Fixes #1171

What it does

How to test

Author checklist

@jarthana
Copy link
Member Author

This is till a WIP, but revealed few more issues with instanceof pattern and BinaryExpression. For e.g., the following code:

  public static void foo(String a) {
	  if ( "" + (a instanceof String s0) != null) {
		  System.out.println(s0);
	  }
  }

Without the patch, we report about s0 not being resolved. With the patch that error goes away, but then we report s0 not being initialized.

I am not an expert in this area, but I tend to think if this is because we always create conditional flow for an InstanceOfExpression.Should we recognize that the effective type for this expression is String and do it differently. I would like to hear from the expert (@stephan-herrmann) on what we should do here.

@srikanth-sankaran
Copy link
Contributor

This PR can be closed as the problem has been fixed by #2011 and is no longer reproducible on master

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

Successfully merging this pull request may close these issues.

StackOverflowException in XLargeTest#test011()
2 participants