Abstract member may not have private modifier
[email protected] Mon, 11 Jan 2016 19:35:54 -0800 (PST)
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
Hi All
In Scala 2.11.0,
@native private def sampleMethod(argOne: Long): Int
private def sampleMethod(argOne: Long): Int
Above declarations gives the following compiler error
> abstract member may not have private modifier @native private def
> sampleMethod(argOne: Long): Int
What is the proper way of declaring native private member method or private
member
Note:
@native protected def sampleMethod(argOne Long): Int compiles
@native private def sampleMethod(argOne: Long): Int = 0 compiles but doesn't
generate byte code entry
@native private def sampleMethod(argOne: Long): Int = _ gives following
error
unbound placeholder parameter @native private def
>> sampleMethod(argOne: Long): Int = _ –
>>
>
These question posted at stack overflow as well
http://stackoverflow.com/questions/34718192/why-scala-native-method-can-not-be-private?noredirect=1#comment57185725_34718192
Can anyone explain the rational behind this behavior
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.