Skip to content

Commit ea1d344

Browse files
authored
Specify nullary for nullary export (#24164)
Closes #17589 [skip ci]
2 parents dcafdf3 + 35d1165 commit ea1d344

File tree

1 file changed

+4
-0
lines changed
  • docs/_docs/reference/other-new-features

1 file changed

+4
-0
lines changed

docs/_docs/reference/other-new-features/export.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ def f: c.T = ...
140140
exported `a` cannot be already a member of the object containing the export.
141141
This restriction might be lifted in the future.
142142

143+
1. Export aliases of nullary Java methods (which may be invoked from Scala with or without empty parentheses)
144+
are nullary methods in Scala and require parentheses in application. By contrast, since member types are
145+
preserved, an export alias will have a flexible type if that was inferred for the Java method.
146+
143147
<a id="note_class"></a>
144148
(\*) **Note:** Unless otherwise stated, the term "class" in this discussion also includes object and trait definitions.
145149

0 commit comments

Comments
 (0)