File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
test/kotlin/library-tests/java_and_kotlin_internal Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,11 @@ abstract class Modifiable extends Element {
46
46
// TODO: `isSealed()` conflicts with `ClassOrInterface.isSealed()`. What name do we want to use here?
47
47
predicate isSealedKotlin ( ) { this .hasModifier ( "sealed" ) }
48
48
49
- /** Holds if this element has a `public` modifier or is implicitly public. */
50
- predicate isPublic ( ) { this .hasModifier ( "public" ) }
49
+ /**
50
+ * Holds if this element has a `public` modifier or is implicitly public.
51
+ * Kotlin `internal` members, which are `public` in JVM Bytecode, are not considered `public`.
52
+ */
53
+ predicate isPublic ( ) { this .hasModifier ( "public" ) and not this .isInternal ( ) }
51
54
52
55
/** Holds if this element has a `protected` modifier. */
53
56
predicate isProtected ( ) { this .hasModifier ( "protected" ) }
Original file line number Diff line number Diff line change 1
1
isPublic
2
- | Kotlin.kt:2:11:3:2 | kotlinFun$main |
3
2
isInternal
4
3
| Kotlin.kt:2:11:3:2 | kotlinFun$main |
5
4
#select
You can’t perform that action at this time.
0 commit comments