Skip to content

Commit 88f3249

Browse files
authored
Avoid identity transformation on types (#1115)
1 parent 8a10a97 commit 88f3249

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

effekt/shared/src/main/scala/effekt/core/PolymorphismBoxing.scala

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,7 @@ object PolymorphismBoxing extends Phase[CoreTransformed, CoreTransformed] {
8383

8484
def transform(decl: ModuleDecl)(using Context, DeclarationContext): ModuleDecl = decl match {
8585
case ModuleDecl(path, includes, declarations, externs, definitions, exports) =>
86-
ModuleDecl(path, includes, declarations map transform, externs map transform, definitions map transform, exports)
87-
}
88-
89-
def transform(declaration: Declaration)(using Context, DeclarationContext): Declaration = declaration match {
90-
case Declaration.Data(id, tparams, constructors) =>
91-
Declaration.Data(id, tparams, constructors map transform)
92-
case Declaration.Interface(id, tparams, properties) =>
93-
Declaration.Interface(id, tparams, properties map transform)
94-
}
95-
96-
def transform(constructor: Constructor)(using Context, DeclarationContext): Constructor = constructor match {
97-
case Constructor(id, tparams, fields) => Constructor(id, tparams, fields map transform)
98-
}
99-
100-
def transform(property: Property)(using Context, DeclarationContext): Property = property match {
101-
case Property(id, tpe) => Property(id, transform(tpe))
102-
}
103-
104-
def transform(field: Field)(using Context, DeclarationContext): Field = field match {
105-
case Field(id, tpe) => Field(id, transform(tpe))
86+
ModuleDecl(path, includes, declarations, externs map transform, definitions map transform, exports)
10687
}
10788

10889
def transform(extern: Extern)(using Context, DeclarationContext): Extern = extern match {

0 commit comments

Comments
 (0)