Skip to content
Snippets Groups Projects
Commit 60f4783e authored by Philippe Suter's avatar Philippe Suter
Browse files

Fixed the annotation detection for "generator".

parent 607979dd
No related branches found
No related tags found
No related merge requests found
...@@ -31,9 +31,11 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin) ...@@ -31,9 +31,11 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
} }
} }
private def stopIfErrors: Nothing = { private def stopIfErrors: Unit = {
if(reporter.hasErrors) println("There were errors.") if(reporter.hasErrors) {
exit(0) println("There were errors.")
exit(0)
}
} }
private def findContracts(tree: Tree): Unit = tree match { private def findContracts(tree: Tree): Unit = tree match {
...@@ -62,9 +64,7 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin) ...@@ -62,9 +64,7 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
} }
def mircoTraverser(unit: CompilationUnit)(tree: Tree): Unit = { def mircoTraverser(unit: CompilationUnit)(tree: Tree): Unit = {
println("called on " + unit)
lazy val genAnnot: Symbol = definitions.getClass("funcheck.lib.Specs.generator") lazy val genAnnot: Symbol = definitions.getClass("funcheck.lib.Specs.generator")
println(genAnnot)
tree match { tree match {
case d @ DefDef(mods, name, _, _, _, _) => { case d @ DefDef(mods, name, _, _, _, _) => {
...@@ -83,6 +83,7 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin) ...@@ -83,6 +83,7 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
} }
}) })
} }
case _ => ;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment