public String toString() {
return "Unary expression";
}
public PsiType getType() {
IElementType opToken = getOperationTokenType();
<BUG>GrExpression operand = getOperand();
PsiType opType = operand.getType();</BUG>
if (opToken == GroovyTokenTypes.mBNOT) {
if (opType.equalsToText("java.lang.String")) {
return getTypeByFQName(PATTERN_FQ_NAME);

public String toString() {
return "Unary expression";
}
public PsiType getType() {
IElementType opToken = getOperationTokenType();
GrExpression operand = getOperand();
if (operand == null) return null;
PsiType opType = operand.getType();
if (opToken == GroovyTokenTypes.mBNOT) {
if (opType.equalsToText("java.lang.String")) {
return getTypeByFQName(PATTERN_FQ_NAME);
