Skip to content

Commit b22d1a3

Browse files
authored
Update Main.scala
1 parent 8300806 commit b22d1a3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/scala-3/Main.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ object Main {
3333

3434
val c = Symbol.requiredClass("example.C")
3535
val a = Symbol.classSymbol("example.A")
36-
val List(x1: Symbol) = c.methodMember("x")
37-
val x = x1.tree.asInstanceOf[DefDef].returnTpt.tpe
38-
val Apply(_, NamedArg("clazz", TypeApply(Ident("classOf"), clazz :: Nil)) :: Nil) = x1.annotations.head
36+
val List(x: Symbol) = c.methodMember("x")
37+
val Apply(_, NamedArg("clazz", TypeApply(Ident("classOf"), clazz :: Nil)) :: Nil) = x.annotations.head
3938
val result = asSeenFrom(clazz.tpe.asDottyType, c.typeRef.asDottyType, a.asDottySymbol).fromDottyType
4039
println(result.show)
4140
assert(result =:= TypeRepr.of[D[Int]], result)

0 commit comments

Comments
 (0)