@@ -1002,7 +1002,9 @@ class FunctionalInterface extends Interface {
10021002 * and `double`.
10031003 */
10041004class PrimitiveType extends Type , @primitive {
1005- PrimitiveType ( ) { this .getName ( ) .regexpMatch ( "float|double|int|boolean|short|byte|char|long" ) }
1005+ PrimitiveType ( ) {
1006+ this .getName ( ) = [ "float" , "double" , "int" , "boolean" , "short" , "byte" , "char" , "long" ]
1007+ }
10061008
10071009 /** Gets the boxed type corresponding to this primitive type. */
10081010 BoxedType getBoxedType ( ) { result .getPrimitiveType ( ) = this }
@@ -1217,9 +1219,9 @@ predicate erasedHaveIntersection(RefType t1, RefType t2) {
12171219class IntegralType extends Type {
12181220 IntegralType ( ) {
12191221 exists ( string name |
1220- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1222+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12211223 |
1222- name . regexpMatch ( "byte| char| short| int| long" )
1224+ name = [ "byte" , " char" , " short" , " int" , " long"]
12231225 )
12241226 }
12251227}
@@ -1228,7 +1230,7 @@ class IntegralType extends Type {
12281230class BooleanType extends Type {
12291231 BooleanType ( ) {
12301232 exists ( string name |
1231- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1233+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12321234 |
12331235 name = "boolean"
12341236 )
@@ -1239,7 +1241,7 @@ class BooleanType extends Type {
12391241class CharacterType extends Type {
12401242 CharacterType ( ) {
12411243 exists ( string name |
1242- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1244+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12431245 |
12441246 name = "char"
12451247 )
@@ -1250,9 +1252,9 @@ class CharacterType extends Type {
12501252class NumericOrCharType extends Type {
12511253 NumericOrCharType ( ) {
12521254 exists ( string name |
1253- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1255+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12541256 |
1255- name . regexpMatch ( "byte| char| short| int| long| double| float" )
1257+ name = [ "byte" , " char" , " short" , " int" , " long" , " double" , " float"]
12561258 )
12571259 }
12581260}
@@ -1261,9 +1263,9 @@ class NumericOrCharType extends Type {
12611263class FloatingPointType extends Type {
12621264 FloatingPointType ( ) {
12631265 exists ( string name |
1264- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1266+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12651267 |
1266- name . regexpMatch ( "float| double" )
1268+ name = [ "float" , " double"]
12671269 )
12681270 }
12691271}
0 commit comments