-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:inlinearea:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.area:opaque-typesitype:bug
Milestone
Description
Compiler version
3.6.2
Minimized code
//> using scala 3.6.2
//> using options -experimental
import scala.language.experimental.namedTuples
opaque type System = (wires: Any)
extension (system: System)
inline def foo = system.wires
end extension
val simulation: System = ???
val _ = simulation.foo
Output
-- Error: solution.scala:12:19 -------------------------------------------------
12 |val _ = simulation.foo
| ^^^^^^^^^^^^^^
|undefined: tup.productElement # -1: TermRef(TermRef(NoPrefix,val tup),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:144
9 | inline def foo = system.wires
| ^^^^^^^^^^^^
---------------------------------------------------------------------------
1 error found
Expectation
Compiles without any issue
Notes
- The soft keyword
opaque
inSystem
is important to reproduce the issue - The soft keyword
inline
infoo
is important to reproduce the issue
Metadata
Metadata
Assignees
Labels
area:inlinearea:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.area:opaque-typesitype:bug