Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
39df3e2b
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39df3e2b
编写于
1月 14, 2021
作者:
J
Jinseong Jeon
提交者:
Mikhail Glukhikh
1月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FIR checker: introduce member function checker
上级
5594af0d
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
102 addition
and
51 deletion
+102
-51
compiler/fir/analysis-tests/testData/resolve/expresssions/importedReceiver.kt
...s-tests/testData/resolve/expresssions/importedReceiver.kt
+1
-1
compiler/fir/analysis-tests/testData/resolve/expresssions/privateVisibility.kt
...-tests/testData/resolve/expresssions/privateVisibility.kt
+1
-1
compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantModalityModifierChecker.fir.txt
...extendedCheckers/RedundantModalityModifierChecker.fir.txt
+1
-2
compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantModalityModifierChecker.kt
...olve/extendedCheckers/RedundantModalityModifierChecker.kt
+4
-4
compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionReturnType.kt
.../testData/resolve/visibility/exposedFunctionReturnType.kt
+1
-1
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberFunctionChecker.kt
...analysis/checkers/declaration/FirMemberFunctionChecker.kt
+69
-0
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt
...rg/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt
+8
-4
compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt
...etbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt
+1
-0
compiler/testData/diagnostics/tests/AbstractInAbstractClass.fir.kt
...testData/diagnostics/tests/AbstractInAbstractClass.fir.kt
+2
-2
compiler/testData/diagnostics/tests/AbstractInClass.fir.kt
compiler/testData/diagnostics/tests/AbstractInClass.fir.kt
+3
-3
compiler/testData/diagnostics/tests/AbstractInTrait.fir.kt
compiler/testData/diagnostics/tests/AbstractInTrait.fir.kt
+1
-1
compiler/testData/diagnostics/tests/declarationChecks/kt2397.fir.kt
...estData/diagnostics/tests/declarationChecks/kt2397.fir.kt
+1
-1
compiler/testData/diagnostics/tests/enum/AbstractInEnum.fir.kt
...ler/testData/diagnostics/tests/enum/AbstractInEnum.fir.kt
+2
-2
compiler/testData/diagnostics/tests/modifiers/privateInInterface.fir.kt
...ata/diagnostics/tests/modifiers/privateInInterface.fir.kt
+1
-1
compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.fir.kt
.../headerClass/expectClassWithExplicitAbstractMember.fir.kt
+0
-23
compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.kt
...form/headerClass/expectClassWithExplicitAbstractMember.kt
+1
-0
compiler/testData/diagnostics/tests/multiplatform/headerFunInNonHeaderClass.fir.kt
...tics/tests/multiplatform/headerFunInNonHeaderClass.fir.kt
+1
-1
compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.fir.kt
...gnostics/tests/multiplatform/modifierApplicability.fir.kt
+1
-1
compiler/testData/diagnostics/tests/variance/Visibility.fir.kt
...ler/testData/diagnostics/tests/variance/Visibility.fir.kt
+1
-1
compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/neg/1.1.fir.kt
...ion/class-declaration/abstract-classes/p-1/neg/1.1.fir.kt
+2
-2
未找到文件。
compiler/fir/analysis-tests/testData/resolve/expresssions/importedReceiver.kt
浏览文件 @
39df3e2b
...
...
@@ -13,7 +13,7 @@ interface Your<R> {
object
My
:
Your
<
Double
>
{
fun
<
T
>
T
.
bar
()
{}
fun
baz
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
fun
baz
()<!>
fun
Boolean
.
gau
()
{}
}
...
...
compiler/fir/analysis-tests/testData/resolve/expresssions/privateVisibility.kt
浏览文件 @
39df3e2b
...
...
@@ -38,7 +38,7 @@ private class Private {
fun
withLocals
()
{
class
Local
{
private
fun
bar
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
private
fun
bar
()<!>
fun
baz
()
{
bar
()
...
...
compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantModalityModifierChecker.fir.txt
浏览文件 @
39df3e2b
...
...
@@ -16,8 +16,7 @@ FILE: RedundantModalityModifierChecker.kt
public abstract fun foo(): R|kotlin/Unit|
private final fun bar(): R|kotlin/Unit| {
}
private final fun bar(): R|kotlin/Unit|
public open fun goo(): R|kotlin/Unit| {
}
...
...
compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantModalityModifierChecker.kt
浏览文件 @
39df3e2b
...
...
@@ -9,14 +9,14 @@ interface Interface {
get
()
=
42
<!>
<!
REDUNDANT_MODALITY_MODIFIER
{
LT
}!>
// Redundant
<!
REDUNDANT_MODALITY_MODIFIER
{
PSI
}!>
abstract
<!>
fun
foo
()<!>
// error
private
final
fun
bar
()
{}
<!
PRIVATE_FUNCTION_WITH_NO_BODY
{
LT
}!>
// error
<!
PRIVATE_FUNCTION_WITH_NO_BODY
{
PSI
}!>
private
<!>
final
fun
bar
()<!>
<!
REDUNDANT_MODALITY_MODIFIER
{
LT
}!><!
REDUNDANT_MODALITY_MODIFIER
{
PSI
}!>
open
<!>
fun
goo
()
{}<!>
<!
REDUNDANT_MODALITY_MODIFIER
{
LT
}!><!
REDUNDANT_MODALITY_MODIFIER
{
PSI
}!>
abstract
<!>
fun
tar
()<!>
// error
abstract
fun
too
()
{}
<!
ABSTRACT_FUNCTION_WITH_BODY
{
LT
}!>
// error
<!
ABSTRACT_FUNCTION_WITH_BODY
{
PSI
}!>
abstract
<!>
fun
too
()
{}<!>
}
interface
B
{
<!
REDUNDANT_MODALITY_MODIFIER
{
LT
}!><!
REDUNDANT_MODALITY_MODIFIER
{
PSI
}!>
abstract
<!>
var
bar
:
Unit
<
!
>
...
...
compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionReturnType.kt
浏览文件 @
39df3e2b
...
...
@@ -5,7 +5,7 @@ class A {
}
abstract
class
B
{
<!
EXPOSED_FUNCTION_RETURN_TYPE
{
LT
}!>
fun
<
!
EXPOSED_FUNCTION_RETURN_TYPE
{
PSI
}!
>
foo
<!>(
str
:
String
):
A
.
InnerA
<
!
>
<!
EXPOSED_FUNCTION_RETURN_TYPE
{
LT
}
,
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
fun
<
!
EXPOSED_FUNCTION_RETURN_TYPE
{
PSI
}!
>
foo
<!>(
str
:
String
):
A
.
InnerA
<
!
>
}
private
enum
class
Some
{
...
...
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberFunctionChecker.kt
0 → 100644
浏览文件 @
39df3e2b
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package
org.jetbrains.kotlin.fir.analysis.checkers.declaration
import
org.jetbrains.kotlin.descriptors.Visibilities
import
org.jetbrains.kotlin.fir.FirFakeSourceElementKind
import
org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
import
org.jetbrains.kotlin.fir.analysis.checkers.extended.report
import
org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter
import
org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors
import
org.jetbrains.kotlin.fir.declarations.*
import
org.jetbrains.kotlin.lexer.KtTokens
// See old FE's [DeclarationsChecker]
object
FirMemberFunctionChecker
:
FirRegularClassChecker
()
{
override
fun
check
(
declaration
:
FirRegularClass
,
context
:
CheckerContext
,
reporter
:
DiagnosticReporter
)
{
for
(
member
in
declaration
.
declarations
)
{
if
(
member
is
FirSimpleFunction
)
{
checkFunction
(
declaration
,
member
,
context
,
reporter
)
}
}
}
private
fun
checkFunction
(
containingDeclaration
:
FirRegularClass
,
function
:
FirSimpleFunction
,
context
:
CheckerContext
,
reporter
:
DiagnosticReporter
)
{
val
source
=
function
.
source
?:
return
if
(
source
.
kind
is
FirFakeSourceElementKind
)
return
// If multiple (potentially conflicting) modality modifiers are specified, not all modifiers are recorded at `status`.
// So, our source of truth should be the full modifier list retrieved from the source.
val
modifierList
=
with
(
FirModifierList
)
{
source
.
getModifierList
()
}
val
isAbstract
=
function
.
isAbstract
||
modifierList
?.
modifiers
?.
any
{
it
.
token
==
KtTokens
.
ABSTRACT_KEYWORD
}
==
true
if
(
isAbstract
)
{
if
(!
containingDeclaration
.
canHaveAbstractDeclaration
)
{
reporter
.
report
(
source
,
FirErrors
.
ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
)
}
if
(
function
.
hasBody
)
{
reporter
.
report
(
source
,
FirErrors
.
ABSTRACT_FUNCTION_WITH_BODY
)
}
}
val
isInsideExpectClass
=
isInsideExpectClass
(
containingDeclaration
,
context
)
val
isOpen
=
function
.
isOpen
||
modifierList
?.
modifiers
?.
any
{
it
.
token
==
KtTokens
.
OPEN_KEYWORD
}
==
true
val
isExternal
=
function
.
isExternal
||
modifierList
?.
modifiers
?.
any
{
it
.
token
==
KtTokens
.
EXTERNAL_KEYWORD
}
==
true
if
(!
function
.
hasBody
)
{
if
(
containingDeclaration
.
isInterface
)
{
if
(
Visibilities
.
isPrivate
(
function
.
visibility
))
{
reporter
.
report
(
source
,
FirErrors
.
PRIVATE_FUNCTION_WITH_NO_BODY
)
}
if
(!
isInsideExpectClass
&&
!
isAbstract
&&
isOpen
)
{
reporter
.
report
(
source
,
FirErrors
.
REDUNDANT_OPEN_IN_INTERFACE
)
}
}
else
if
(!
isInsideExpectClass
&&
!
isAbstract
&&
!
isExternal
)
{
// TODO: we need to check if modifiers of the function already get some errors, e.g., INCOMPATIBLE_MODIFIERS
reporter
.
report
(
FirErrors
.
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
.
on
(
source
,
function
.
symbol
))
}
}
}
private
fun
isInsideExpectClass
(
containingDeclaration
:
FirRegularClass
,
context
:
CheckerContext
):
Boolean
=
// Note that the class that contains the currently visiting function is *not* in the context's containing declarations *yet*.
containingDeclaration
.
isExpect
||
context
.
containingDeclarations
.
asReversed
().
any
{
it
is
FirRegularClass
&&
it
.
isExpect
}
}
compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt
浏览文件 @
39df3e2b
...
...
@@ -14,10 +14,7 @@ import org.jetbrains.kotlin.fir.declarations.FirClass
import
org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration
import
org.jetbrains.kotlin.fir.expressions.FirExpression
import
org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
import
org.jetbrains.kotlin.fir.symbols.impl.FirPropertyAccessorSymbol
import
org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
import
org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
import
org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
import
org.jetbrains.kotlin.fir.symbols.impl.*
import
org.jetbrains.kotlin.fir.types.ConeKotlinType
import
org.jetbrains.kotlin.lexer.KtModifierKeywordToken
import
org.jetbrains.kotlin.name.Name
...
...
@@ -111,6 +108,7 @@ object FirErrors {
val
REDUNDANT_MODIFIER
by
error2
<
FirSourceElement
,
PsiElement
,
KtModifierKeywordToken
,
KtModifierKeywordToken
>()
val
DEPRECATED_MODIFIER_PAIR
by
error2
<
FirSourceElement
,
PsiElement
,
KtModifierKeywordToken
,
KtModifierKeywordToken
>()
val
INCOMPATIBLE_MODIFIERS
by
error2
<
FirSourceElement
,
PsiElement
,
KtModifierKeywordToken
,
KtModifierKeywordToken
>()
val
REDUNDANT_OPEN_IN_INTERFACE
by
warning0
<
FirSourceElement
,
KtModifierListOwner
>(
SourceElementPositioningStrategies
.
MODALITY_MODIFIER
)
// Applicability
val
NONE_APPLICABLE
by
error1
<
FirSourceElement
,
PsiElement
,
Collection
<
AbstractFirBasedSymbol
<
*
>>>()
...
...
@@ -149,6 +147,12 @@ object FirErrors {
val
LOCAL_OBJECT_NOT_ALLOWED
by
error1
<
FirSourceElement
,
KtNamedDeclaration
,
Name
>(
SourceElementPositioningStrategies
.
DECLARATION_NAME
)
val
LOCAL_INTERFACE_NOT_ALLOWED
by
error1
<
FirSourceElement
,
KtNamedDeclaration
,
Name
>(
SourceElementPositioningStrategies
.
DECLARATION_NAME
)
// Functions
val
ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
by
error0
<
FirSourceElement
,
KtModifierListOwner
>(
SourceElementPositioningStrategies
.
MODALITY_MODIFIER
)
val
ABSTRACT_FUNCTION_WITH_BODY
by
error0
<
FirSourceElement
,
KtModifierListOwner
>(
SourceElementPositioningStrategies
.
MODALITY_MODIFIER
)
val
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
by
error1
<
FirSourceElement
,
PsiElement
,
FirFunctionSymbol
<
*
>>()
val
PRIVATE_FUNCTION_WITH_NO_BODY
by
error0
<
FirSourceElement
,
KtModifierListOwner
>(
SourceElementPositioningStrategies
.
VISIBILITY_MODIFIER
)
// Properties & accessors
val
ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
by
error0
<
FirSourceElement
,
KtModifierListOwner
>(
SourceElementPositioningStrategies
.
MODALITY_MODIFIER
)
val
PRIVATE_PROPERTY_IN_INTERFACE
by
error0
<
FirSourceElement
,
KtModifierListOwner
>(
SourceElementPositioningStrategies
.
VISIBILITY_MODIFIER
)
...
...
compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt
浏览文件 @
39df3e2b
...
...
@@ -47,6 +47,7 @@ object CommonDeclarationCheckers : DeclarationCheckers() {
FirSupertypeInitializedWithoutPrimaryConstructor
,
FirTypeParametersInObjectChecker
,
FirTypeMismatchOnOverrideChecker
,
FirMemberFunctionChecker
,
FirMemberPropertyChecker
,
)
...
...
compiler/testData/diagnostics/tests/AbstractInAbstractClass.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -23,10 +23,10 @@ abstract class MyAbstractClass() {
abstract
val
e3
:
Int
=
<!
ABSTRACT_PROPERTY_WITH_INITIALIZER
!>
0
<!>;
<!
ABSTRACT_PROPERTY_WITH_GETTER
!>
get
()
=
a
<!>
//methods
fun
f
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
fun
f
()<!>
fun
g
()
{}
abstract
fun
h
()
abstract
fun
j
()
{}
<!
ABSTRACT_FUNCTION_WITH_BODY
!>
abstract
<!>
fun
j
()
{}
//property accessors
var
i
:
Int
abstract
get
abstract
set
...
...
compiler/testData/diagnostics/tests/AbstractInClass.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -23,10 +23,10 @@ class MyClass() {
<!
ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
!>
abstract
<!>
val
e3
:
Int
=
0
;
get
()
=
a
//methods
fun
f
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
fun
f
()<!>
fun
g
()
{}
abstract
fun
h
()
abstract
fun
j
()
{}
<!
ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
!>
abstract
<!>
fun
h
()
<!
ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
,
ABSTRACT_FUNCTION_WITH_BODY
!>
abstract
<!>
fun
j
()
{}
//property accessors
var
i
:
Int
abstract
get
abstract
set
...
...
compiler/testData/diagnostics/tests/AbstractInTrait.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -26,7 +26,7 @@ interface MyTrait {
fun
f
()
fun
g
()
{}
abstract
fun
h
()
abstract
fun
j
()
{}
<!
ABSTRACT_FUNCTION_WITH_BODY
!>
abstract
<!>
fun
j
()
{}
//property accessors
var
i
:
Int
abstract
get
abstract
set
...
...
compiler/testData/diagnostics/tests/declarationChecks/kt2397.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -13,5 +13,5 @@ interface T {
}
class
A
{
final
fun
foo
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
final
fun
foo
()<!>
}
\ No newline at end of file
compiler/testData/diagnostics/tests/enum/AbstractInEnum.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -25,10 +25,10 @@ enum class MyEnum() {
abstract
val
e3
:
Int
=
<!
ABSTRACT_PROPERTY_WITH_INITIALIZER
!>
0
<!>;
<!
ABSTRACT_PROPERTY_WITH_GETTER
!>
get
()
=
a
<!>
//methods
fun
f
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
fun
f
()<!>
fun
g
()
{}
abstract
fun
h
()
abstract
fun
j
()
{}
<!
ABSTRACT_FUNCTION_WITH_BODY
!>
abstract
<!>
fun
j
()
{}
//property accessors
var
i
:
Int
abstract
get
abstract
set
...
...
compiler/testData/diagnostics/tests/modifiers/privateInInterface.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -6,7 +6,7 @@ interface My {
final
val
y
:
Int
final
val
yy
:
Int
get
()
=
1
private
fun
foo
():
Int
<!
PRIVATE_FUNCTION_WITH_NO_BODY
!>
private
<!>
fun
foo
():
Int
// ok
private
fun
bar
()
=
42
}
compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.fir.kt
已删除
100644 → 0
浏览文件 @
5594af0d
// !LANGUAGE: +MultiPlatformProjects
// MODULE: m1-common
// FILE: common.kt
interface
Foo
{
fun
foo
()
}
expect
class
NonAbstractClass
:
Foo
{
abstract
fun
bar
()
<!
ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
!>
abstract
<!>
val
baz
:
Int
abstract
override
fun
foo
()
}
expect
abstract
class
AbstractClass
:
Foo
{
abstract
fun
bar
()
abstract
val
baz
:
Int
abstract
override
fun
foo
()
}
\ No newline at end of file
compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.kt
浏览文件 @
39df3e2b
// FIR_IDENTICAL
// !LANGUAGE: +MultiPlatformProjects
// MODULE: m1-common
// FILE: common.kt
...
...
compiler/testData/diagnostics/tests/multiplatform/headerFunInNonHeaderClass.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -3,7 +3,7 @@
// FILE: common.kt
class
Foo
{
expect
fun
bar
():
String
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
expect
fun
bar
():
String
<
!
>
}
// MODULE: m1-jvm(m1-common)
...
...
compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -9,7 +9,7 @@ class Outer expect constructor() {
expect
init
{}
expect
fun
foo
()
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
expect
fun
foo
()<!>
expect
val
bar
:
Int
}
...
...
compiler/testData/diagnostics/tests/variance/Visibility.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -16,5 +16,5 @@ interface Test<in I, out O> {
fun
internal_fun
(
i
:
O
)
:
I
public
fun
public_fun
(
i
:
O
)
:
I
protected
fun
protected_fun
(
i
:
O
)
:
I
private
fun
private_fun
(
i
:
O
)
:
I
<!
PRIVATE_FUNCTION_WITH_NO_BODY
!>
private
<!>
fun
private_fun
(
i
:
O
)
:
I
}
\ No newline at end of file
compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/neg/1.1.fir.kt
浏览文件 @
39df3e2b
...
...
@@ -5,8 +5,8 @@
// TESTCASE NUMBER: 1
abstract
class
Base
()
{
abstract
fun
foo
()
=
{}
fun
boo
()
:
Unit
<!
ABSTRACT_FUNCTION_WITH_BODY
!>
abstract
<!>
fun
foo
()
=
{}
<!
NON_ABSTRACT_FUNCTION_WITH_NO_BODY
!>
fun
boo
()
:
Unit
<
!
>
abstract
val
a
=
<!
ABSTRACT_PROPERTY_WITH_INITIALIZER
!>
""
<!>
val
b
var
d
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录