如何在跨度代码的 kotlin 注释中写入 /*
?
例如:
/**
* Defines the route `/route/*`
*/
fun defineRoute() {
/* ... */
}
现在,根据 Kotlin 的说法,/route/*
是 nested comment 的开头。 (所以整个文件都被注释了)。我现在使用 /route/{*}
但这不是一个不错的解决方案。
最佳答案
您也可以关闭嵌套评论:
/**
* Defines the route `/route/*`
*/*/
fun defineRoute() {
/* ... */
}
这样做的好处是,一旦他们修复了 Kotlin 解析器,就会被破坏,并提醒删除它们。
关于kotlin - 如何在 kotlin 注释中写入 "/*"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53891473/