Skip to content
Snippets Groups Projects
Commit b7f011a1 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

It was a type parameter in disguise after all

parent 925c2afb
No related branches found
No related tags found
No related merge requests found
...@@ -16,10 +16,10 @@ abstract class TransformationPhase extends LeonPhase[Program, Program] { ...@@ -16,10 +16,10 @@ abstract class TransformationPhase extends LeonPhase[Program, Program] {
} }
} }
abstract class UnitPhase[Program] extends LeonPhase[Program, Program] { abstract class UnitPhase[T] extends LeonPhase[T, T] {
def apply(ctx: LeonContext, p: Program): Unit def apply(ctx: LeonContext, p: T): Unit
override def run(ctx: LeonContext)(p: Program) = { override def run(ctx: LeonContext)(p: T) = {
apply(ctx, p) apply(ctx, p)
p p
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment