We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.5.0-RC4 and others
//> using scala 3.5.0-RC4, 3.nightly import scala.language.experimental.namedTuples class Test[S <: String & Singleton](name: S): type NT = NamedTuple.NamedTuple[Tuple1[S], Tuple1[Int]] def nt: NT = ??? type Name = S type NT2 = NamedTuple.NamedTuple[Tuple1[Name], Tuple1[Int]] def nt2: NT2 = ??? @main def main = val foo = new Test("bar") foo.nt.bar // works foo.nt2.bar // fails
Compiling project (Scala 3.5.0-RC4, JVM (8)) [error] .\test.scala:21:11 [error] Malformed NamedTuple: names must be string types, but foo.Name was found. [error] foo.nt2.bar // fails [error] ^ Error compiling project (Scala 3.5.0-RC4, JVM (8))
Successful compilation.
The text was updated successfully, but these errors were encountered:
ba2c731
KacperFKorban
Successfully merging a pull request may close this issue.
Compiler version
3.5.0-RC4 and others
Minimized code
Output
Expectation
Successful compilation.
The text was updated successfully, but these errors were encountered: