Skip to content

Commit b8075f7

Browse files
committed
Add a small aliased test
1 parent da393a4 commit b8075f7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,9 +1266,6 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
12661266
}
12671267

12681268
def Refinement_apply(parent: Type, name: String, info: TypeOrBounds /* Type | TypeBounds */)(given ctx: Context): Refinement = {
1269-
// fixme: support type refinements (type vs term)
1270-
// examine info maybe (TypeOrBounds are used for refinements)
1271-
// check aliasing of refinement
12721269
val name1 =
12731270
info match
12741271
case _: TypeBounds => name.toTypeName

tests/run-macros/refined-selectable-macro/Test_2.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ object Test {
1919
val age: Int
2020
}
2121

22+
type Person2 = Person
23+
2224
def main(args: Array[String]): Unit = {
2325
val person: Person = Record("name" -> "Emma", "age" -> 42).asInstanceOf[Person]
2426

@@ -66,5 +68,9 @@ object Test {
6668
val age: Int
6769
val name: String
6870
}
71+
72+
val p3: Person2 = person
73+
74+
p3.toTuple : (("name", String), ("age", Int))
6975
}
7076
}

0 commit comments

Comments
 (0)