You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A method in the following Java code returns an inner class of a generic class. In scalac, the type is J_1#A[String]#B[String], in dotty it is j.A[T]#B[String]:
the type argument of A is lost,
the prefix depends on the receiver of the method.
J_1.java:
publicclassJ_1{
publicclassA<T>{
publicclassB<U>{}
}
A<String>.B<String> m(){
J_1j = newJ_1();
A<String> a = j.newA<>();
A<String>.B<String> b = a.newB<>();
returnb;
}
}
Fixes the prefix of inner classes when parsing Java signatures.
Uses the prefix computed from the signature instead of just the symbol
to construct the TypeRef.
A method in the following Java code returns an inner class of a generic class. In scalac, the type is
J_1#A[String]#B[String]
, in dotty it isj.A[T]#B[String]
:A
is lost,J_1.java:
S_2.scala:
Output:
There seems to be a simple fix so I intend to post a PR.
The text was updated successfully, but these errors were encountered: