Closed NextdoorPsycho closed 2 years ago
I don't think that the issue is related to the one I experienced with istanceof
, but rather with the Pattern Matching feature introduced with JEP 305.
I also experienced the same issue trying to use this feature and got the same error with the same stack trace.
The problem is not there when instanceof
is used the classic way.
EDIT: I don't know for sure, but the problem may have started after updating IntelliJ to Build #IU-222.3739.54
I don't think that the issue is related to the one I experienced with
istanceof
, but rather with the Pattern Matching feature introduced with JEP 305.I also experienced the same issue trying to use this feature and got the same error with the same stack trace.
The problem is not there when
instanceof
is used the classic way.EDIT: I don't know for sure, but the problem may have started after updating IntelliJ to Build #IU-222.3739.54
I did not even think about that, yea same
Fixed with IJ plugin release 2022.1.21 available from JetBrains Marketplace within 48 hours.
Describe the bug What im trying to do is create an instanced variable based on a functional check ie:
if (e.getEntity() instanceof Player p ) {}
As soon as I type the "p" it just locks up manfold and bricks my IDE while im on that page. While here, I noticed this: https://github.com/manifold-systems/manifold/issues/378 and feel its relatedTo Reproduce Steps to reproduce the behavior: In My case I was making a generic Instance check,
@EventHandler public void on(EntityDamageEvent e) { if (e.getEntity() instanceof org.bukkit.entity.Player p && !e.getCause().equals(EntityDamageEvent.DamageCause.STARVATION) && hasAdaptation(p)) { addPotionStacks(p, PotionEffectType.HUNGER, 5 + getLevel(p), 100, true); addPotionStacks(p, PotionEffectType.INVISIBILITY, 1, 50 * getLevel(p), true); } }
Obviously the use cases are different but I think this is a general non-structural issue (or im just slow and ignorant on the subject, just trying to be a good boi and report my problems)Expected behavior Not lock the IDE when declaring an instanceof Variable
Desktop (please complete the following information):
Additional context Ill be watching this, let me know if you need anything from me, Here is the project as an example: https://github.com/VolmitSoftware/Adapt/blob/main/src/main/java/com/volmit/adapt/content/adaptation/hunter/HunterRegen.java That's AN instance not the only, all the instanced variables are like this Stack trace Please include a stack trace if applicable https://pastebin.com/0MueRuw1