-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:experimental:modularityIssues related to the modularity extension.Issues related to the modularity extension.itype:bug
Description
Compiler version
3.7.2
Minimized code
//> using scala 3.7.2
//> using options -language:experimental.modularity
class Foo(tracked val pattern: String):
type Fields = pattern.type // e.g. Fields on a Selectable
type Bar = (Foo{val pattern: "/hello/:name"})#Fields
type Qux = (Foo("/hello/:name"))#Fields // error
Output
type Qux = (Foo("/hello/:name"))#Fields // error
// ^ Foo{val pattern: ("/hello/:name" : String)} is not a valid type prefix, since it is not an immutable path
Expectation
applied constructor type in Qux
is a syntax sugar for the same type of Bar
, so should compile
Metadata
Metadata
Assignees
Labels
area:experimental:modularityIssues related to the modularity extension.Issues related to the modularity extension.itype:bug