Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/neg/i22320.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- [E008] Not Found Error: tests/neg/i22320.scala:19:19 ----------------------------------------------------------------
19 | val z = system.z // error
| ^^^^^^^^
| value z is not a member of a.System.
| An extension method was tried, but could not be fully constructed:
|
| a.z(system)
|
| failed with:
|
| Found: (system : a.System)
| Required: a.SimulatedSystem
19 changes: 19 additions & 0 deletions tests/neg/i22320.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package a:
opaque type System = Any
opaque type SimulatedSystem <: System = System

extension (system: System)
def x: BigInt = ???
def y: BigInt = ???
end extension

extension (system: SimulatedSystem)
def z: BigInt = ???
end extension

package b:
import a.*
def issue(system: System) =
val x = system.x
val y = system.y
val z = system.z // error