Associate synthetic component function descriptors with corresponding

constructor parameters
This commit is contained in:
Alexey Sedunov
2014-08-05 17:57:53 +04:00
parent 386e39f4a2
commit 311166737f
13 changed files with 59 additions and 17 deletions
@@ -62,6 +62,10 @@ public final class JvmAbi {
return isDelegated ? propertyName.asString() + DELEGATED_PROPERTY_NAME_SUFFIX : propertyName.asString();
}
public static boolean isAccessorName(String name) {
return name.startsWith(JvmAbi.GETTER_PREFIX) || name.startsWith(JvmAbi.SETTER_PREFIX);
}
private JvmAbi() {
}
}
@@ -0,0 +1,8 @@
package org.jetbrains.jet.lang.resolve.name
import java.util.regex.Pattern
public val COMPONENT_FUNCTION_PATTERN: Pattern = Pattern.compile("^component(\\d+)$")
public fun String.isComponentFunctionName(): Boolean = COMPONENT_FUNCTION_PATTERN.matcher(this).matches()
public fun Name.isComponentFunctionName(): Boolean = asString().isComponentFunctionName()