Skip to content

Commit b0a7062

Browse files
committed
chore: add regression test for #13889
1 parent b2850be commit b0a7062

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/pos/i13889.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)