- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
Closed as not planned
Labels
area:typeritype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on OpenCB failure in purplekingdomgames/ultraviolet - build logs
Compiler version
3.7.1-RC1
Last good release: 3.7.0-RC1-bin-20250222-4dc4668-NIGHTLY
First bad release: 3.7.0-RC1-bin-20250225-a25fe5e-NIGHTLY
Bisect points to 32ac2e6
3.7.0 is not affected
Minimized code
object types{
  final case class vec2(x: Float, y: Float)
  final case class vec4(x: Float, y: Float, z: Float, w: Float)
  object vec4:
    def apply(xy: vec2, z: Float, w: Float): vec4 = vec4(xy.x, xy.y, z, w)
  opaque type Shader[In, Out] = In => Out
  object Shader:
    inline def apply[In, Out](f: In => Out): Shader[In, Out] = f
    inline def apply[In](f: In => Unit): Shader[In, Unit]    = f
    inline def apply(body: => Any): Shader[Unit, Unit] = (_: Unit) => body
}
import types.*
class GLSLEnvTests {
  case class FragEnv(UV: vec2)
  inline def fragment: Shader[FragEnv, vec4] =
    Shader { env =>
      val x = env.UV
      vec4(env.UV, 0.0f, 1.0f)
    }
}Output
Compiling project (Scala 3.7.2-RC1-bin-20250520-baac46c-NIGHTLY, JVM (21))
[error] ./example.scala:49:15
[error] value UV is not a member of Any
[error]       val x = env.UV
[error]               ^^^^^^
[error] ./example.scala:50:12
[error] value UV is not a member of Any
[error]       vec4(env.UV, 0.0f, 1.0f)
[error]            ^^^^^^Expectation
Metadata
Metadata
Assignees
Labels
area:typeritype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore