Skip to content

Comments

Add Support for Char Literals#153

Merged
rcosta358 merged 4 commits intomainfrom
chars
Feb 23, 2026
Merged

Add Support for Char Literals#153
rcosta358 merged 4 commits intomainfrom
chars

Conversation

@rcosta358
Copy link
Collaborator

This PR adds support for char literals, preventing the exception Literal of type char not implemented when chars are used in the Java source code. In the SMT solver, char literals are translated to their corresponding integer representation.

@rcosta358 rcosta358 self-assigned this Feb 16, 2026
@rcosta358 rcosta358 added the enhancement New feature or request label Feb 16, 2026
Copy link
Collaborator

@CatarinaGamboa CatarinaGamboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! We should be careful in the future if we want to have more operations with chars inside the refinements, since they can be misleading since we are using only their int values.
If possible add a test with a char being used as an int like

// function
void write(int x){...}
// client
write('c');

@rcosta358 rcosta358 merged commit 1bd08b4 into main Feb 23, 2026
1 check passed
@rcosta358 rcosta358 deleted the chars branch February 23, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants