Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"

This reverts commit ba5c85d6

^KT-52684 Related
This commit is contained in:
Denis.Zharkov
2022-06-08 16:22:29 +03:00
committed by teamcity
parent 67f9025f9e
commit 9caa60d389
21 changed files with 390 additions and 713 deletions
@@ -1,14 +0,0 @@
// FIR_IDENTICAL
// !LANGUAGE: +AllowExpressionAfterTypeReferenceWithoutSpacing
// ISSUE: KT-35811
class A<T>
val reportedProperty: A<String>=A()
fun reportedFunction(a: A<String>=A()): A<String>=a
val unreportedProperty0: A<String> =A()
fun unreportedFunction0(a: A<String> =A()): A<String> =A()
val unreportedProperty1: String=""
fun unreportedFunction1(a: Int=0): Int=a
@@ -1,15 +0,0 @@
package
public val reportedProperty: A<kotlin.String>
public val unreportedProperty0: A<kotlin.String>
public val unreportedProperty1: kotlin.String = ""
public fun reportedFunction(/*0*/ a: A<kotlin.String> = ...): A<kotlin.String>
public fun unreportedFunction0(/*0*/ a: A<kotlin.String> = ...): A<kotlin.String>
public fun unreportedFunction1(/*0*/ a: kotlin.Int = ...): kotlin.Int
public final class A</*0*/ T> {
public constructor A</*0*/ T>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,13 +0,0 @@
// !LANGUAGE: -AllowExpressionAfterTypeReferenceWithoutSpacing
// ISSUE: KT-35811
class A<T>
val reportedProperty: A<String>=A()
fun reportedFunction(a: A<String>=A()): A<String>=a
val unreportedProperty0: A<String> =A()
fun unreportedFunction0(a: A<String> =A()): A<String> =A()
val unreportedProperty1: String=""
fun unreportedFunction1(a: Int=0): Int=a
@@ -1,13 +0,0 @@
// !LANGUAGE: -AllowExpressionAfterTypeReferenceWithoutSpacing
// ISSUE: KT-35811
class A<T>
val reportedProperty: A<String><!EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED!>=<!>A()
fun reportedFunction(a: A<String><!EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED!>=<!>A()): A<String><!EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED!>=<!>a
val unreportedProperty0: A<String> =A()
fun unreportedFunction0(a: A<String> =A()): A<String> =A()
val unreportedProperty1: String=""
fun unreportedFunction1(a: Int=0): Int=a
@@ -1,15 +0,0 @@
package
public val reportedProperty: A<kotlin.String>
public val unreportedProperty0: A<kotlin.String>
public val unreportedProperty1: kotlin.String = ""
public fun reportedFunction(/*0*/ a: A<kotlin.String> = ...): A<kotlin.String>
public fun unreportedFunction0(/*0*/ a: A<kotlin.String> = ...): A<kotlin.String>
public fun unreportedFunction1(/*0*/ a: kotlin.Int = ...): kotlin.Int
public final class A</*0*/ T> {
public constructor A</*0*/ T>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,3 +0,0 @@
val a: A<B>= 1
fun a(): A<B>= 1
fun a(a: A<B>= 1) {}
@@ -1,85 +0,0 @@
KtFile: TypeParameterBeforeEqualSign.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('a')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(GT)('>')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('a')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(GT)('>')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('a')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('a')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('A')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('B')
PsiElement(GT)('>')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')