Skip to content
Snippets Groups Projects
Commit 5a5d3d93 authored by Mikaël Mayer's avatar Mikaël Mayer
Browse files

More permissive use of @extern without library so that the body is compiled...

More permissive use of @extern without library so that the body is compiled but not directly executable.
parent ce4bf15e
No related branches found
No related tags found
No related merge requests found
...@@ -22,10 +22,10 @@ object $ { ...@@ -22,10 +22,10 @@ object $ {
* Should be used only in ensuring. * Should be used only in ensuring.
* TODO: enforce this. * TODO: enforce this.
*/ */
@extern @library @extern
def inState[T] : Set[$[T]] = sys.error("inState method is not executable!") def inState[T] : Set[$[T]] = sys.error("inState method is not executable!")
@extern @library @extern
def outState[T] : Set[$[T]] = sys.error("outState method is not executable") def outState[T] : Set[$[T]] = sys.error("outState method is not executable")
/** /**
......
...@@ -201,7 +201,7 @@ trait CodeGeneration { ...@@ -201,7 +201,7 @@ trait CodeGeneration {
funDef.fullBody funDef.fullBody
} else { } else {
funDef.body.getOrElse( funDef.body.getOrElse(
if(funDef.annotations contains "library") { if(funDef.annotations contains "extern") {
Error(funDef.id.getType, "Body of " + funDef.id.name + " not implemented at compile-time and still executed.") Error(funDef.id.getType, "Body of " + funDef.id.name + " not implemented at compile-time and still executed.")
} else { } else {
throw CompilationException("Can't compile a FunDef without body: "+funDef.id.name) throw CompilationException("Can't compile a FunDef without body: "+funDef.id.name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment