remove validation from Name.identifier

This commit is contained in:
Michael Nedzelsky
2015-10-02 00:45:42 +03:00
parent 001b1269b9
commit cc2dfc4937
5 changed files with 7 additions and 16 deletions
@@ -85,7 +85,7 @@ abstract class JetNamedDeclarationStub<T extends KotlinStubWithFqName<?>> extend
JetModifierList modifierList = getModifierList();
if (modifierList != null &&
modifierList.hasModifier(JetTokens.OPERATOR_KEYWORD) &&
!OperatorConventions.isConventionName(Name.identifierNoValidate(name))) {
!OperatorConventions.isConventionName(Name.identifier(name))) {
removeModifier(JetTokens.OPERATOR_KEYWORD);
}
@@ -57,7 +57,7 @@ abstract class JetSimpleNameExpressionImpl(node: ASTNode) : JetExpressionImpl(no
fun getReferencedNameAsNameImpl(expresssion: JetSimpleNameExpression): Name {
val name = expresssion.getReferencedName()
return Name.identifierNoValidate(name)
return Name.identifier(name)
}
fun getReferencedNameImpl(expression: JetSimpleNameExpression): String {
@@ -100,7 +100,7 @@ public class ControlStructureTypingUtils {
) {
assert argumentNames.size() == isArgumentNullable.size();
Name specialFunctionName = Name.identifierNoValidate("<SPECIAL-FUNCTION-FOR-" + constructionName + "-RESOLVE>");
Name specialFunctionName = Name.identifier("<SPECIAL-FUNCTION-FOR-" + constructionName + "-RESOLVE>");
SimpleFunctionDescriptorImpl function = SimpleFunctionDescriptorImpl.create(
moduleDescriptor, Annotations.Companion.getEMPTY(), specialFunctionName, CallableMemberDescriptor.Kind.DECLARATION, SourceElement.NO_SOURCE
@@ -108,7 +108,7 @@ public class ControlStructureTypingUtils {
TypeParameterDescriptor typeParameter = TypeParameterDescriptorImpl.createWithDefaultBound(
function, Annotations.Companion.getEMPTY(), false, Variance.INVARIANT,
Name.identifierNoValidate("<TYPE-PARAMETER-FOR-" + constructionName + "-RESOLVE>"), 0);
Name.identifier("<TYPE-PARAMETER-FOR-" + constructionName + "-RESOLVE>"), 0);
JetType type = typeParameter.getDefaultType();
JetType nullableType = TypeUtils.makeNullable(type);