IDEA-64612 Autocasting from completion is not inserted after "assert X instanceof T" (and before another assignment)

This commit is contained in:
peter
2011-01-25 19:28:58 +01:00
parent 427ab9cbb6
commit 9f4efe0e8f
4 changed files with 51 additions and 2 deletions
@@ -0,0 +1,24 @@
import javax.swing.*;
import java.awt.*;
public class Bar {
static class CellWrapper {
public boolean isSeparator() {
return true;
}
}
static class MyRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean s, boolean focus) {
assert value instanceof CellWrapper;
value.is<caret>
mySelected = isSelected;
}
}
}
@@ -0,0 +1,24 @@
import javax.swing.*;
import java.awt.*;
public class Bar {
static class CellWrapper {
public boolean isSeparator() {
return true;
}
}
static class MyRenderer extends DefaultListCellRenderer {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean s, boolean focus) {
assert value instanceof CellWrapper;
((CellWrapper) value).isSeparator()<caret>
mySelected = isSelected;
}
}
}