Perhaps I'm misremembering, but isn't it possible ...
# getting-started
r
Perhaps I'm misremembering, but isn't it possible to override a getter with a val? Given the following Java interface, I'd thought I'd be able to satisfy it with `data class MyOAuth2User(override val name: String) : OAuth2User`; however, it complains that
'name' overrides nothing
.
Copy code
// OAuth2User.java
public interface OAuth2User {
    String getName();
}
1
h
r
Done! Hopefully it gets picked up as the workaround is quite awkward.
(Also, in retrospect, I was probably thinking of Groovy.)