From 35d11655c99d46e79d7b3cd314f3bf81e8bde61c Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 9 Oct 2025 22:12:55 -0700 Subject: [PATCH] Specify nullary for nullary export --- docs/_docs/reference/other-new-features/export.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/_docs/reference/other-new-features/export.md b/docs/_docs/reference/other-new-features/export.md index e21d369b6b5e..4287e053c774 100644 --- a/docs/_docs/reference/other-new-features/export.md +++ b/docs/_docs/reference/other-new-features/export.md @@ -140,6 +140,10 @@ def f: c.T = ... exported `a` cannot be already a member of the object containing the export. This restriction might be lifted in the future. + 1. Export aliases of nullary Java methods (which may be invoked from Scala with or without empty parentheses) + are nullary methods in Scala and require parentheses in application. By contrast, since member types are + preserved, an export alias will have a flexible type if that was inferred for the Java method. + (\*) **Note:** Unless otherwise stated, the term "class" in this discussion also includes object and trait definitions.