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
--Error: solution.scala:12:19-------------------------------------------------12|val_= simulation.foo
|^^^^^^^^^^^^^^|undefined: tup.productElement #-1:TermRef(TermRef(NoPrefix,valtup),productElement) at inlining
|---------------------------------------------------------------------------|Inline stack trace
|--------------------------------------|This location contains code that was inlined from NamedTuple.scala:144|--------------------------------------|This location contains code that was inlined from NamedTuple.scala:144|--------------------------------------|This location contains code that was inlined from NamedTuple.scala:1449|inlinedeffoo= system.wires
|^^^^^^^^^^^^---------------------------------------------------------------------------1 error found
Expectation
Compiles without any issue
Notes
The soft keyword opaque in System is important to reproduce the issue
The soft keyword inline in foo is important to reproduce the issue
The text was updated successfully, but these errors were encountered:
hamzaremmal
changed the title
Inlining issue for named tuples hidden behing opaque types
Inlining issue for named tuples hidden behind opaque types
Jan 8, 2025
….apply`
We previously needed to handle the case where the result of `toTuple` was an
`EmptyTuple` separately from the rest, since `apply` used to be only defined for
`NonEmptyTuple`s. This was changed in scala#21291, making the inline match in
`NamedTupleDecomposition.apply` no longer necessary.
The underlying issue with the proxies introduced to handle opaque types with
inline defs is likely still present. Nevertheless, it is probably best to fix
this specific instance of the problem with NamedTuples as soon as possible.
Fixesscala#22324
We previously needed to handle the case where the result of `toTuple` was an
`EmptyTuple` separately from the rest, since `apply` used to be only defined for
`NonEmptyTuple`s. This was changed in scala#21291, making the inline match in
`NamedTupleDecomposition.apply` no longer necessary.
The underlying issue with the proxies introduced to handle opaque types with
inline defs is likely still present. Nevertheless, it is probably best to fix
this specific instance of the problem with NamedTuples as soon as possible.
Fixesscala#22324
Compiler version
3.6.2
Minimized code
Output
Expectation
Compiles without any issue
Notes
opaque
inSystem
is important to reproduce the issueinline
infoo
is important to reproduce the issueThe text was updated successfully, but these errors were encountered: