You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qualifiedNameOf[CaseClass](_.nested1CaseClass.nested2CaseClass.nested3CaseClass.member) should equal("nested1CaseClass.nested2CaseClass.nested3CaseClass.member")
124
+
qualifiedNameOf((cc: CaseClass) => cc.nested1CaseClass.nested2CaseClass) should equal("nested1CaseClass.nested2CaseClass")
125
+
}
126
+
127
+
test("nested Java method calls") {
128
+
qualifiedNameOf[String](_.length.toLong) should equal("length.toLong")
129
+
qualifiedNameOf[String](_.length().toString()) should equal("length.toString")
130
+
qualifiedNameOf[String] { str => str.length().toString } should equal("length.toString")
131
+
}
132
+
133
+
test("nested symbolic members") {
134
+
classC1(val`multi word name`:C2)
135
+
classC2(val你好:C3)
136
+
classC3(val???:String)
137
+
138
+
qualifiedNameOf[C1](_.`multi word name`.你好.???) should equal ("multi word name.你好.???")
139
+
}
140
+
141
+
test("nested generic members") {
142
+
traitT1 {
143
+
deffoo[T]:T2=???
144
+
}
145
+
traitT2 {
146
+
defbar[T]:Int=???
147
+
}
148
+
149
+
qualifiedNameOf[T1](_.foo.bar) should equal ("foo.bar")
150
+
}
151
+
152
+
test("nested function call") {
153
+
classC1(valc2:C2)
154
+
classC2(valc3:C3.type)
155
+
objectC3 {
156
+
deffunc(x: Int) =???
157
+
}
158
+
159
+
qualifiedNameOf[C1](_.c2.c3.func _) should equal ("c2.c3.func")
160
+
qualifiedNameOf[C1](_.c2.c3.func(???)) should equal ("c2.c3.func")
123
161
}
124
162
125
163
test("object") {
@@ -198,5 +236,7 @@ class NameOfTest extends AnyFunSuite with Matchers {
0 commit comments