Skip to content

[Bug]: Control Flow graph missing edge for implicit default case in switch #5730

Closed
@Mr-Pine

Description

Describe the bug

In a switch statement without a default case the edge/path for not taking any case is missing:
image

Expected would be something like this:
image

Source code you are trying to analyze/transform

public int mySwitch() {
	int a = 0;
	switch (a) {
		case 1: break;
	}
}

Source code for your Spoon processing

testMethod("mySwitch", false, null, null, null); // with testMethod from the cfg test class ForwardFlowBuilderVisitorTest.java

Actual output

No response

Expected output

No response

Spoon Version

10.4.2 / Control Flow 0.0.2-SNAPSHOT

JVM Version

21

What operating system are you using?

Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions