File tree 3 files changed +17
-3
lines changed
scaladoc-testcases/src/tests
3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ package lookupInheritedMembers {
15
15
* [[tests.lookupInheritedMembers.pack2.B.x ]]
16
16
* [[tests.lookupInheritedMembers.pack2.B.y ]]
17
17
* [[tests.lookupInheritedMembers.pack2.B.MyType ]]
18
+ *
18
19
*/
19
20
class LookupInheritedMembers
21
+
22
+ /**
23
+ * This look up is problematic, because is lazyloaded by dotty.
24
+ *
25
+ * [[java.util.Formatter ]]
26
+ */
27
+ class JavaInheritedMembers
20
28
}
29
+
Original file line number Diff line number Diff line change @@ -103,13 +103,15 @@ trait MemberLookup {
103
103
members.asInstanceOf [Iterator [Symbol ]]
104
104
}
105
105
106
- private def hackIsNotAbsent (using Quotes )(rsym : quotes.reflect.Symbol ) = {
106
+ private def hackIsNotAbsent (using Quotes )(rsym : quotes.reflect.Symbol ) =
107
107
import dotty .tools .dotc
108
108
given dotc .core.Contexts .Context = quotes.asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
109
109
val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
110
110
// note: Predef has .info = NoType for some reason
111
- sym.isCompleted && sym.info.exists
112
- }
111
+ val iorc = sym.infoOrCompleter
112
+ iorc match
113
+ case _ : dotc.core.SymDenotations .ModuleCompleter | dotc.core.SymDenotations .NoCompleter | dotc.core.Types .NoType | _ : dotc.core.NoLoader => false
114
+ case _ => true
113
115
114
116
private def localLookup (using Quotes )(
115
117
sel : MemberLookup .Selector ,
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ class LookupTestCases[Q <: Quotes](val q: Quotes) {
38
38
39
39
" java.util.AbstractCollection" -> cls(" java.util.AbstractCollection" ),
40
40
" java.lang.String" -> cls(" java.lang.String" ),
41
+ " java.util.Formatter" -> cls(" java.util.Formatter" ),
42
+ " java.io.Flushable" -> cls(" java.io.Flushable" ),
43
+ " java.util.List" -> cls(" java.util.List" ),
41
44
42
45
" tests.lookupInheritedMembers.pack1.A.x" ->
43
46
cls(" tests.lookupInheritedMembers.pack1.A" ).fun(" x" ),
You can’t perform that action at this time.
0 commit comments