Rendering for dynamic types
This commit is contained in:
@@ -56,6 +56,7 @@ import org.jetbrains.jet.lang.psi.JetFile
|
||||
import org.jetbrains.jet.lang.psi.JetPackageDirective
|
||||
import org.jetbrains.jet.lang.psi.JetImportDirective
|
||||
import org.jetbrains.jet.lang.psi.JetImportList
|
||||
import org.jetbrains.jet.lang.psi.JetDynamicType
|
||||
|
||||
// invoke this instead of getText() when you need debug text to identify some place in PSI without storing the element itself
|
||||
// this is need to avoid unnecessary file parses
|
||||
@@ -123,6 +124,10 @@ private object DebugTextBuildingVisitor : JetVisitor<String, Unit>() {
|
||||
return render(userType, userType.getQualifier(), userType.getReferenceExpression(), userType.getTypeArgumentList())
|
||||
}
|
||||
|
||||
override fun visitDynamicType(type: JetDynamicType, data: Unit?): String? {
|
||||
return "dynamic"
|
||||
}
|
||||
|
||||
override fun visitAnnotation(annotation: JetAnnotation, data: Unit?): String? {
|
||||
return renderChildren(annotation, " ", "[", "]")
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ d: (kotlin.Nothing..kotlin.Any?)): kotlin.Unit
|
||||
internal fun foo(/*0*/ d: dynamic): kotlin.Unit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
internal fun dyn(/*0*/ d: (kotlin.Nothing..kotlin.Any?)): kotlin.Unit
|
||||
internal fun foo(/*0*/ d: (kotlin.Nothing..kotlin.Any?)): kotlin.String
|
||||
internal fun dyn(/*0*/ d: dynamic): kotlin.Unit
|
||||
internal fun foo(/*0*/ d: dynamic): kotlin.String
|
||||
internal fun foo(/*0*/ d: kotlin.Int): kotlin.Int
|
||||
internal fun nothing(/*0*/ d: dynamic): kotlin.Int
|
||||
internal fun nothing(/*0*/ d: kotlin.Nothing): kotlin.String
|
||||
|
||||
Reference in New Issue
Block a user