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
objectapi:exportimpl.*objectimpl:classBar[T](foo: T)
objectTest1:importapi.*valvalue=Bar(0) // Not Found: BarobjectTest2:importimpl.*valvalue=Bar(0) // WorksobjectTest3:importapi.*valvalue=newBar[Int](0) // Works
Output
[error] 10|valvalue=Bar(0) // Not Found: Bar
[error] |^^^
[error] |Notfound: Bar
Expectation
When exporting a class that has a type parameter via a facade object, should be able to construct that class without error, having T be inferred rather than explicitly specified, as is the case when the class is imported directly from the implementation object.
The text was updated successfully, but these errors were encountered:
It works if you do new Bar(0), it looks like #12311 needs to be extended to handle exporting constructor proxies of classes with type parameters too.
smarter
changed the title
Constructing generic classes exported via facade object fails
Constructor proxies of classes with type parameters are not exported
Dec 21, 2021
Compiler version
3.1.0
Minimized code
Output
Expectation
When exporting a class that has a type parameter via a facade object, should be able to construct that class without error, having
T
be inferred rather than explicitly specified, as is the case when the class is imported directly from the implementation object.The text was updated successfully, but these errors were encountered: