I got an unexpected internal NPE when playing with this script.

```
POST _scripts/painless/_execute
{
  "script": {
    "source": """
    return /[^\w]+/.split('abc   def higkln').toArray(String[]::new)
    """
  }
}
```
```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "script_exception",
        "reason" : "compile error",
        "script_stack" : [ ],
        "script" : "\n    return /[^\\w]+/.split('abc   def higkln').toArray(String[]::new)\n    ",
        "lang" : "painless"
      }
    ],
    "type" : "script_exception",
    "reason" : "compile error",
    "script_stack" : [ ],
    "script" : "\n    return /[^\\w]+/.split('abc   def higkln').toArray(String[]::new)\n    ",
    "lang" : "painless",
    "caused_by" : {
      "type" : "null_pointer_exception",
      "reason" : "Cannot read field \"annotations\" because the return value of \"org.elasticsearch.painless.lookup.PainlessLookup.lookupPainlessClass(java.lang.Class)\" is null"
    }
  },
  "status" : 400
}

```
modules/lang-painless/src/main/java/org/elasticsearch/painless/phase/DefaultSemanticAnalysisPhase.java
}
            semanticScope.putDecoration(userSymbolNode, new StaticType(staticType));
        } else if (semanticScope.isVariableDefined(symbol)) {
            if (read == false && write == false) {
                throw userSymbolNode.createError(new IllegalArgumentException("not a statement: variable [" + symbol + "] not used"));
            }
            Location location = userSymbolNode.getLocation();
            Variable variable = semanticScope.getVariable(location, symbol);
            if (write && variable.isFinal()) {
                throw userSymbolNode.createError(new IllegalArgumentException("Variable [" + variable.name() + "] is read-only."));
            }
            Class<?> valueType = variable.type();
            semanticScope.putDecoration(userSymbolNode, new ValueType(valueType));
        } else {
            semanticScope.putDecoration(userSymbolNode, new PartialCanonicalTypeName(symbol));
        }
    }
    /**
     * Visits a dot expression which is a field index with a qualifier (prefix) and
     * may resolve to a static type, a partial canonical type, a field, a shortcut to a
     * getter/setter method on a type, or a getter/setter for a Map or List.
     * Checks: type validation, method resolution, field resolution
     */
    @Override
    public void visitDot(EDot userDotNode, SemanticScope semanticScope) {
        boolean read = semanticScope.getCondition(userDotNode, Read.class);
        boolean write = semanticScope.getCondition(userDotNode, Write.class);
        if (read == false && write == false) {
            throw userDotNode.createError(new IllegalArgumentException("not a statement: result of dot operator [.] not used"));
        }