CompletionResult (@NotNull LookupElement element) { if (!myMatcher.prefixMatches(element)) { throw new AssertionError("The new element doesn't match the prefix"); } return new CompletionResult(element, myMatcher, mySorter); }