You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In kotlin, the default access level for classes, members and variables is public, while in Swift is internal. As a result, when transpaling code we should also update the access level accordingly.
This code:
class ImplicitInternalClass {
private let privateVar: Int = 1
let implicitInternalVar: Int = 1
internal let explicitInternalVar: Int = 1
private class PrivateClass {
private var privateVar: Int = 1
var implicitPrivateVar: Int = 1
class InheritedAccess {
private var privateVar: Int = 1
var implicitPrivateVar: Int = 1
func inheritedAccessFunc() {}
}
func inheritedAccessFunc() {}
}
func implicitInternalFunc() {}
internal func internalFunc() {}
private func privateFunc() {}
}
Should produce
internal class ImplicitInternalClass {
private val privateVar: Int = 1
internal val implicitInternalVar: Int = 1
internal val explicitInternalVar: Int = 1
private class PrivateClass {
private var privateVar: Int = 1
var implicitPrivateVar: Int = 1
class InheritedAccess {
private var privateVar: Int = 1
var implicitPrivateVar: Int = 1
fun inheritedAccessFunc() {}
}
fun inheritedAccessFunc() {}
}
internal fun implicitInternalFunc() {}
internal fun internalFunc() {}
private fun privateFunc() {}
}
The text was updated successfully, but these errors were encountered:
In kotlin, the default access level for classes, members and variables is
public
, while in Swift isinternal
. As a result, when transpaling code we should also update the access level accordingly.This code:
Should produce
The text was updated successfully, but these errors were encountered: