type unescaped in *.kt files

This commit is contained in:
Andrey Breslav
2014-10-14 08:27:21 +04:00
parent 56d1979d9b
commit b1e452b568
38 changed files with 130 additions and 130 deletions
@@ -48,7 +48,7 @@ class PlatformStaticGenerator(
val iv = InstructionAdapter(methodVisitor)
val classDescriptor = descriptor.getContainingDeclaration() as ClassDescriptor
val singletonValue = StackValue.singleton(classDescriptor, typeMapper)!!
singletonValue.put(singletonValue.`type`, iv);
singletonValue.put(singletonValue.type, iv);
var index = 0;
for (paramType in asmMethod.getArgumentTypes()) {
iv.load(index, paramType);
@@ -33,7 +33,7 @@ trait IntervalWithHandler {
val startLabel: LabelNode
val endLabel: LabelNode
val handler: LabelNode
val `type`: String?
val type: String?
}
class TryCatchBlockNodeInfo(val node: TryCatchBlockNode, val onlyCopyNotProcess: Boolean) : IntervalWithHandler {
@@ -44,15 +44,15 @@ class TryCatchBlockNodeInfo(val node: TryCatchBlockNode, val onlyCopyNotProcess:
get() = node.end
override val handler: LabelNode
get() = node.handler!!
override val `type`: String?
get() = node.`type`
override val type: String?
get() = node.type
}
class TryCatchBlockNodePosition(val nodeInfo: TryCatchBlockNodeInfo, var position: TryCatchPosition): IntervalWithHandler by nodeInfo
class TryBlockCluster<T : IntervalWithHandler>(val blocks: MutableList<T>) {
val defaultHandler: T?
get() = blocks.firstOrNull() { it.`type` == null }
get() = blocks.firstOrNull() { it.type == null }
}
@@ -67,8 +67,8 @@ public class JetPsiFactory(private val project: Project) {
return (property.getInitializer() as JetCallExpression).getTypeArgumentList()!!
}
public fun createType(`type`: String): JetTypeReference {
return createProperty("val x : $`type`").getTypeReference()!!
public fun createType(type: String): JetTypeReference {
return createProperty("val x : $type").getTypeReference()!!
}
public fun createStar(): PsiElement {
@@ -152,13 +152,13 @@ public class JetPsiFactory(private val project: Project) {
return PsiFileFactory.getInstance(project).createFileFromText(fileName, JetFileType.INSTANCE, text, LocalTimeCounter.currentTime(), true) as JetFile
}
public fun createProperty(name: String, `type`: String?, isVar: Boolean, initializer: String?): JetProperty {
val text = (if (isVar) "var " else "val ") + name + (if (`type` != null) ":" + `type` else "") + (if (initializer == null) "" else " = " + initializer)
public fun createProperty(name: String, type: String?, isVar: Boolean, initializer: String?): JetProperty {
val text = (if (isVar) "var " else "val ") + name + (if (type != null) ":" + type else "") + (if (initializer == null) "" else " = " + initializer)
return createProperty(text)
}
public fun createProperty(name: String, `type`: String?, isVar: Boolean): JetProperty {
return createProperty(name, `type`, isVar, null)
public fun createProperty(name: String, type: String?, isVar: Boolean): JetProperty {
return createProperty(name, type, isVar, null)
}
public fun createProperty(text: String): JetProperty {
@@ -545,14 +545,14 @@ public class JetPsiFactory(private val project: Project) {
return this
}
public fun param(name: String, `type`: String): CallableBuilder {
public fun param(name: String, type: String): CallableBuilder {
assert(target == Target.FUNCTION)
assert(state == State.FIRST_PARAM || state == State.REST_PARAMS)
if (state == State.REST_PARAMS) {
sb.append(", ")
}
sb.append(name).append(": ").append(`type`)
sb.append(name).append(": ").append(type)
if (state == State.FIRST_PARAM) {
state = State.REST_PARAMS
}
@@ -560,9 +560,9 @@ public class JetPsiFactory(private val project: Project) {
return this
}
public fun returnType(`type`: String): CallableBuilder {
public fun returnType(type: String): CallableBuilder {
closeParams()
sb.append(": ").append(`type`)
sb.append(": ").append(type)
return this
}