@NotNull
public FunctionDescriptor resolveFunctionDescriptor(DeclarationDescriptor containingDescriptor, JetScope scope, JetFunction function) {
FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl(
containingDescriptor,
AttributeResolver.INSTANCE.resolveAttributes(function.getModifierList()),
<BUG>safeName(function.getName())
</BUG>
);
WritableScope innerScope = semanticServices.createWritableScope(scope, functionDescriptor);
innerScope.addLabeledDeclaration(functionDescriptor);

@NotNull
public FunctionDescriptor resolveFunctionDescriptor(DeclarationDescriptor containingDescriptor, JetScope scope, JetFunction function) {
FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl(
containingDescriptor,
AttributeResolver.INSTANCE.resolveAttributes(function.getModifierList()),
JetPsiUtil.safeName(function.getName())
);
WritableScope innerScope = semanticServices.createWritableScope(scope, functionDescriptor);
innerScope.addLabeledDeclaration(functionDescriptor);
