@@ -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,10 +1252,9 @@ class CharacterType extends Type {
12501252class NumericType extends Type {
12511253 NumericType ( ) {
12521254 exists ( string name |
1253- name = this .( PrimitiveType ) .getName ( ) or
1254- name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1255+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12551256 |
1256- name . regexpMatch ( "byte| short| int| long| double| float" )
1257+ name = [ "byte" , " short" , " int" , " long" , " double" , " float"]
12571258 )
12581259 }
12591260}
@@ -1262,9 +1263,9 @@ class NumericType extends Type {
12621263class NumericOrCharType extends Type {
12631264 NumericOrCharType ( ) {
12641265 exists ( string name |
1265- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1266+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12661267 |
1267- name . regexpMatch ( "byte| char| short| int| long| double| float" )
1268+ name = [ "byte" , " char" , " short" , " int" , " long" , " double" , " float"]
12681269 )
12691270 }
12701271}
@@ -1273,9 +1274,9 @@ class NumericOrCharType extends Type {
12731274class FloatingPointType extends Type {
12741275 FloatingPointType ( ) {
12751276 exists ( string name |
1276- name = this .( PrimitiveType ) .getName ( ) or name = this .( BoxedType ) .getPrimitiveType ( ) .getName ( )
1277+ name = [ this .( PrimitiveType ) .getName ( ) , this .( BoxedType ) .getPrimitiveType ( ) .getName ( ) ]
12771278 |
1278- name . regexpMatch ( "float| double" )
1279+ name = [ "float" , " double"]
12791280 )
12801281 }
12811282}
0 commit comments