dynamic is not a keyword on the left-hand side of callable references

This commit is contained in:
Andrey Breslav
2014-11-21 16:35:24 +03:00
parent 1f66c64ee0
commit e09b624f05
6 changed files with 40 additions and 0 deletions
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -REFLECTION_TYPES_NOT_LOADED -UNUSED_EXPRESSION
// MODULE[js]: m1
// FILE: k.kt
fun test() {
dynamic::foo
}
class dynamic {
fun foo() {}
}
@@ -0,0 +1,11 @@
package
internal fun test(): kotlin.Unit
internal final class dynamic {
public constructor dynamic()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,5 +1,6 @@
dynamic class dynamic<dynamic>(dynamic: dynamic) : dynamic {
[dynamic] fun dynamic() {
val dynamic = 1
dynamic::foo
}
}
@@ -71,6 +71,15 @@ JetFile: DynamicSoftKeyword.kt
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
CALLABLE_REFERENCE_EXPRESSION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('dynamic')
PsiElement(COLONCOLON)('::')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')