We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2850be commit b0a7062Copy full SHA for b0a7062
tests/pos/i13889.scala
@@ -0,0 +1,17 @@
1
+class DiscordRecord(fields: Map[String, Any]) extends Selectable {
2
+ def selectDynamic(name: String): Any = fields(name)
3
+}
4
+
5
+type IdentifyScope = DiscordRecord {
6
+ val username: String
7
8
9
+type IncludeIf[Stated <: String, Requirement <: String, IfMatch] = Seq[Stated] match {
10
+ case Seq[Requirement] => IfMatch
11
+ case _ => Any
12
13
14
+type RawUser[Scopes <: String] = DiscordRecord & IncludeIf[Scopes, "identify", IdentifyScope]
15
16
+val obj: RawUser["identify"] = ???
17
+val _ = obj.username
0 commit comments