@@ -238,12 +238,7 @@ public int getInt() {
238
238
case GLOB -> 1 ; // Assuming globs are truthy, so 1
239
239
case REGEX -> 1 ; // Assuming regexes are truthy, so 1
240
240
case JAVAOBJECT -> value != null ? 1 : 0 ;
241
- default -> {
242
- if ((type & REFERENCE_BIT ) != 0 ) {
243
- yield Overload .numify (this ).getInt ();
244
- }
245
- yield ((RuntimeScalarReference ) value ).getIntRef ();
246
- }
241
+ default -> Overload .numify (this ).getInt ();
247
242
};
248
243
}
249
244
@@ -259,12 +254,7 @@ public long getLong() {
259
254
case GLOB -> 1L ;
260
255
case REGEX -> 1L ;
261
256
case JAVAOBJECT -> value != null ? 1L : 0L ;
262
- default -> {
263
- if ((type & REFERENCE_BIT ) != 0 ) {
264
- yield Overload .numify (this ).getLong ();
265
- }
266
- yield ((RuntimeScalarReference ) value ).getIntRef ();
267
- }
257
+ default -> Overload .numify (this ).getLong ();
268
258
};
269
259
}
270
260
@@ -280,12 +270,7 @@ public double getDouble() {
280
270
case GLOB -> 1.0 ;
281
271
case REGEX -> 1.0 ;
282
272
case JAVAOBJECT -> value != null ? 1.0 : 0.0 ;
283
- default -> {
284
- if ((type & REFERENCE_BIT ) != 0 ) {
285
- yield Overload .numify (this ).getDouble ();
286
- }
287
- yield ((RuntimeScalarReference ) value ).getDoubleRef ();
288
- }
273
+ default -> Overload .numify (this ).getDouble ();
289
274
};
290
275
}
291
276
@@ -304,13 +289,7 @@ public boolean getBoolean() {
304
289
case GLOB -> true ;
305
290
case REGEX -> true ;
306
291
case JAVAOBJECT -> value != null ;
307
- default -> {
308
- // All reference types
309
- if ((type & REFERENCE_BIT ) != 0 ) {
310
- yield Overload .boolify (this ).getBoolean ();
311
- }
312
- yield ((RuntimeScalarReference ) value ).getBooleanRef ();
313
- }
292
+ default -> Overload .boolify (this ).getBoolean ();
314
293
};
315
294
}
316
295
@@ -418,12 +397,7 @@ public String toString() {
418
397
case GLOB -> value == null ? "" : value .toString ();
419
398
case REGEX -> value .toString ();
420
399
case JAVAOBJECT -> value .toString ();
421
- default -> {
422
- if ((type & REFERENCE_BIT ) != 0 ) {
423
- yield Overload .stringify (this ).toString ();
424
- }
425
- yield ((RuntimeScalarReference ) value ).toStringRef ();
426
- }
400
+ default -> Overload .stringify (this ).toString ();
427
401
};
428
402
}
429
403
0 commit comments