Skip to content

Commit

Permalink
Minor corrections from PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
elizarov committed Apr 3, 2023
1 parent 8d9d0bf commit 65ea046
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions proposals/statics.md
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ fun Namespace.static.ext() {
### Static extensions resolution and import

Static extensions can be called in several ways. One way is using making a qualified class with
Static extensions can be called in several ways. One way is using making a qualified call with
`<ClassName>.<extensionName>` as in, for example, `Color.parse(s)`. Similarly to the regular extensions, the
corresponding static extensions has to be imported in order for this call to be resolved.

Expand Down Expand Up @@ -1289,7 +1289,8 @@ Get compiled as the following equivalent Java code:

```java
public class Outer {
public static int getX() { return 0; }
private static int x = 0;
public static int getX() { return x; }
public static void foo(int x) {}
public static ext(int $this$ext) {}
}
Expand Down Expand Up @@ -1317,7 +1318,8 @@ Get compiled as the following equivalent Java code:

```java
public class Namespace {
public static int getProperty() { return 42; }
private static int property = 42;
public static int getProperty() { return property; }
public static void doSomething() {}
}
```
Expand Down Expand Up @@ -1384,9 +1386,6 @@ public class Color {

> Note: It means that adding/removing Kotlin `const` modifier is not a binary compatible change on JVM.
Private static constants in interfaces have the same problem on JVM 1.8 as other private static members.
See [Static members of classes and interfaces on JVM](#static-members-of-classes-and-interfaces-on-jvm).

### Static extensions on JVM

On JVM [Static extensions](#static-extensions) get compiled as the corresponding static or member functions of
Expand Down

0 comments on commit 65ea046

Please sign in to comment.