diff options
Diffstat (limited to 'src/library/scala/native.scala')
-rw-r--r-- | src/library/scala/native.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/library/scala/native.scala b/src/library/scala/native.scala index dbacc78618..49d3ced805 100644 --- a/src/library/scala/native.scala +++ b/src/library/scala/native.scala @@ -16,8 +16,11 @@ package scala * @native def f(x: Int, y: List[Long]): String = ... * }}} * - * Method body is not generated if method is marked with `@native`, - * but it is type checked when present. + * A `@native` method is compiled to the platform's native method, + * while discarding the method's body (if any). The body will be type checked if present. * - * @since 2.6 */ + * A method marked @native must be a member of a class, not a trait (since 2.12). + * + * @since 2.6 + */ class native extends scala.annotation.StaticAnnotation {} |