mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Merge pull request #9201 from Marcono1234/marcono1234/NumericType-type-qll
Java: Move `NumericType` to `Type.qll`
This commit is contained in:
@@ -144,18 +144,6 @@ class NumberType extends RefType {
|
||||
NumberType() { exists(TypeNumber number | hasDescendant(number, this)) }
|
||||
}
|
||||
|
||||
/** A numeric type, including both primitive and boxed types. */
|
||||
class NumericType extends Type {
|
||||
NumericType() {
|
||||
exists(string name |
|
||||
name = this.(PrimitiveType).getName() or
|
||||
name = this.(BoxedType).getPrimitiveType().getName()
|
||||
|
|
||||
name.regexpMatch("byte|short|int|long|double|float")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** An immutable type. */
|
||||
class ImmutableType extends Type {
|
||||
ImmutableType() {
|
||||
|
||||
@@ -1246,6 +1246,18 @@ class CharacterType extends Type {
|
||||
}
|
||||
}
|
||||
|
||||
/** A numeric type, including both primitive and boxed types. */
|
||||
class NumericType extends Type {
|
||||
NumericType() {
|
||||
exists(string name |
|
||||
name = this.(PrimitiveType).getName() or
|
||||
name = this.(BoxedType).getPrimitiveType().getName()
|
||||
|
|
||||
name.regexpMatch("byte|short|int|long|double|float")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** A numeric or character type, which may be either a primitive or a boxed type. */
|
||||
class NumericOrCharType extends Type {
|
||||
NumericOrCharType() {
|
||||
|
||||
Reference in New Issue
Block a user