KT-12623 Fixed ISE: Type parameter ... not found for public fun ...

#KT-12623 Fixed
Also EA-72653 fixed.
This commit is contained in:
Stanislav Erokhin
2016-06-22 21:25:55 +03:00
parent 3eeccb407e
commit 7c2825b397
7 changed files with 86 additions and 3 deletions
+5 -1
View File
@@ -6,4 +6,8 @@ fun @[a()] T.foo<, T, , T>(a : foo) : bar
fun @[a()] T.foo<T, T>(, a : foo, , a: b) : bar
fun foo() : = a;
fun foo() = ;
fun foo() = ;
fun <T> foo<D>()
fun <T> foo<D()
fun <T> A.<foo()
+57
View File
@@ -312,3 +312,60 @@ JetFile: Functions_ERR.kt
<empty list>
PsiWhiteSpace(' ')
PsiElement(SEMICOLON)(';')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
PsiErrorElement:Only one type parameter list is allowed for a function
PsiElement(LT)('<')
PsiElement(IDENTIFIER)('D')
PsiElement(GT)('>')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
PsiErrorElement:Only one type parameter list is allowed for a function
PsiElement(LT)('<')
PsiElement(IDENTIFIER)('D')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
PsiElement(DOT)('.')
PsiErrorElement:Only one type parameter list is allowed for a function
PsiElement(LT)('<')
PsiElement(IDENTIFIER)('foo')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiErrorElement:Expecting '('
<empty list>