Skip to content

Commit 77dae85

Browse files
committed
Exclude exported symbols
1 parent 1d3d0c4 commit 77dae85

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,7 @@ object SymDenotations {
29592959
dependent = null
29602960
}
29612961

2962-
protected def addDependent(dep: InheritedCache) = {
2962+
protected def addDependent(dep: InheritedCache): Unit = {
29632963
if (dependent == null) dependent = new WeakHashMap
29642964
dependent.nn.put(dep, ())
29652965
}

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ object RefChecks {
11981198
def checkPublicFlexibleTypes(sym: Symbol)(using Context): Unit =
11991199
if ctx.explicitNulls && !ctx.isJava
12001200
&& sym.exists && !sym.is(Private) && sym.owner.isClass
1201-
&& !sym.isOneOf(Synthetic | InlineProxy | Param) then
1201+
&& !sym.isOneOf(Synthetic | InlineProxy | Param | Exported) then
12021202
val resTp = sym.info.finalResultType
12031203
if resTp.existsPart(_.isInstanceOf[FlexibleType], StopAt.Static) then
12041204
report.warning(

compiler/src/dotty/tools/repl/AbstractFileClassLoader.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AbstractFileClassLoader(val root: AbstractFile, parent: ClassLoader) exten
2626
// on JDK 20 the URL constructor we're using is deprecated,
2727
// but the recommended replacement, URL.of, doesn't exist on JDK 8
2828
@annotation.nowarn("cat=deprecation")
29-
override protected def findResource(name: String) =
29+
override protected def findResource(name: String): URL | Null =
3030
findAbstractFile(name) match
3131
case null => null
3232
case file => new URL(null, s"memory:${file.path}", new URLStreamHandler {
@@ -35,13 +35,13 @@ class AbstractFileClassLoader(val root: AbstractFile, parent: ClassLoader) exten
3535
override def getInputStream = file.input
3636
}
3737
})
38-
override protected def findResources(name: String) =
38+
override protected def findResources(name: String): java.util.Enumeration[URL] =
3939
findResource(name) match
4040
case null => Collections.enumeration(Collections.emptyList[URL]) //Collections.emptyEnumeration[URL]
4141
case url => Collections.enumeration(Collections.singleton(url))
4242

4343
override def findClass(name: String): Class[?] = {
44-
var file: AbstractFile = root
44+
var file: AbstractFile | Null = root
4545
val pathParts = name.split("[./]").toList
4646
for (dirPart <- pathParts.init) {
4747
file = file.lookupName(dirPart, true)

0 commit comments

Comments
 (0)