Skip to content

Conversation

Marcono1234
Copy link
Contributor

Resolves #9170

"Floating point" refers to both `double` and `float`, and is also used by
the JLS in this way. Therefore the old CodeQL class name for `float` literals
was misleading.
Comment on lines -64 to +54
ee.getAnOperand().getType() instanceof Floating and
ee.getAnOperand().getType() instanceof FloatingPointType and
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change it not actually directly related, but I noticed it while searching for usages of the old expression name.
If you want I can revert this change.

Comment on lines -18 to +20
| literals.kt:20:32:20:35 | 0.0 | FloatingPointLiteral |
| literals.kt:21:32:21:37 | 123.4 | FloatingPointLiteral |
| literals.kt:22:32:22:38 | -123.4 | FloatingPointLiteral |
| literals.kt:20:32:20:35 | 0.0 | FloatLiteral |
| literals.kt:21:32:21:37 | 123.4 | FloatLiteral |
| literals.kt:22:32:22:38 | -123.4 | FloatLiteral |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could not verify whether this test still succeeds because test execution from within VS Code failed:

extraction error: #redacted#\codeql\java\ql\test\kotlin\library-tests\literals\literals.ql
IOException while executing process with args: [#redacted#\AppData\Roaming\Code\User\globalStorage\github.vscode-codeql\distribution23\codeql\java\tools\kotlin-extractor, --java-home, #redacted#\AppData\Roaming\Code\User\globalStorage\github.vscode-codeql\distribution23\codeql\tools\win64\java, --, -J-Xmx2G, literals.kt]
(eventual cause: IOException "CreateProcess error=193, %1 is not a valid Win32 application")

But I assume this is "expected" while Kotlin support is still work in progress.

Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the PR.

@aschackmull aschackmull merged commit 4f5ccfd into github:main May 17, 2022
@Marcono1234 Marcono1234 deleted the marcono1234/FloatingPointLiteral-rename branch May 17, 2022 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java: Rename FloatingPointLiteral to FloatLiteral
2 participants