File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
scaladoc-testcases/src/tests Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ package lookupInheritedMembers {
1515 * [[tests.lookupInheritedMembers.pack2.B.x ]]
1616 * [[tests.lookupInheritedMembers.pack2.B.y ]]
1717 * [[tests.lookupInheritedMembers.pack2.B.MyType ]]
18+ *
1819 */
1920 class LookupInheritedMembers
21+
22+ /**
23+ * This look up is problematic, because is lazyloaded by dotty.
24+ *
25+ * [[java.util.Formatter ]]
26+ */
27+ class JavaInheritedMembers
2028}
29+
Original file line number Diff line number Diff line change @@ -103,13 +103,15 @@ trait MemberLookup {
103103 members.asInstanceOf [Iterator [Symbol ]]
104104 }
105105
106- private def hackIsNotAbsent (using Quotes )(rsym : quotes.reflect.Symbol ) = {
106+ private def hackIsNotAbsent (using Quotes )(rsym : quotes.reflect.Symbol ) =
107107 import dotty .tools .dotc
108108 given dotc .core.Contexts .Context = quotes.asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
109109 val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
110110 // 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
113115
114116 private def localLookup (using Quotes )(
115117 sel : MemberLookup .Selector ,
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ class LookupTestCases[Q <: Quotes](val q: Quotes) {
3838
3939 " java.util.AbstractCollection" -> cls(" java.util.AbstractCollection" ),
4040 " 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" ),
4144
4245 " tests.lookupInheritedMembers.pack1.A.x" ->
4346 cls(" tests.lookupInheritedMembers.pack1.A" ).fun(" x" ),
You can’t perform that action at this time.
0 commit comments