FIR UAST: fix/test allCommentsInFile in UFile
This commit is contained in:
committed by
Ilya Kirillov
parent
03b5c14944
commit
5dc0b52e38
@@ -0,0 +1,6 @@
|
||||
UFile(allCommentsInFile:
|
||||
UComment(// Single-line comment bound to fun foo)
|
||||
UComment(/*
|
||||
* Multi-line comment bound to extension fun buzz
|
||||
*/)
|
||||
)
|
||||
@@ -3,8 +3,12 @@
|
||||
|
||||
package declaration
|
||||
|
||||
// Single-line comment bound to fun foo
|
||||
fun foo(): Int = 42
|
||||
|
||||
/*
|
||||
* Multi-line comment bound to extension fun buzz
|
||||
*/
|
||||
fun String.buzz(): String {
|
||||
return "$this... zzz..."
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
UFile(allCommentsInFile:
|
||||
UComment(// file comment)
|
||||
UComment(// Single-line comment bound to top-level property)
|
||||
UComment(// Single-line comment bound to object)
|
||||
)
|
||||
@@ -1,12 +1,16 @@
|
||||
import java.lang.Runnable
|
||||
import java.lang.Thread
|
||||
|
||||
// file comment
|
||||
|
||||
// Single-line comment bound to top-level property
|
||||
val topRunnable = object : Runnable {
|
||||
override fun run() {
|
||||
println("I'm running")
|
||||
}
|
||||
}
|
||||
|
||||
// Single-line comment bound to object
|
||||
object RunnableManager {
|
||||
val tasks : MutableList<Runnable> = mutableListOf<Runnable>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user