URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2009-02-12 Matthieu Martin <matthieu.mar(a)gmail.com>
Fix a test.
* examples/scool_ast/container_1.aterm: New.
* examples/scool_src/container_1.scl: Add return type.
---
scool_ast/container_1.aterm | 1 +
scool_src/container_1.scl | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
Index: branches/scool-ng/tests/examples/scool_ast/container_1.aterm
===================================================================
--- branches/scool-ng/tests/examples/scool_ast/container_1.aterm (revision 0)
+++ branches/scool-ng/tests/examples/scool_ast/container_1.aterm (revision 135)
@@ -0,0 +1 @@
+Program([StaticClassFunction(Identifier("Container"),ParametersDeclaration([TypedId(Identifier("T"),"type")]),None,StaticClassBlock([AccessBlock(Public,[TypeDefinition(None,Identifier("value_type"),StaticInitialiser(SimpleType("T"))),FunctionDefinition(None,Identifier("get"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("value_type")),FunctionBlock([ReturnStatement(Identifier("value"))])),FunctionDefinition(Some("mutable"),Identifier("set"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("value"),SimpleType("value_type"))]),SimpleType("void")),FunctionBlock([ExpressionStatement(Assign(Identifier("value_"),Identifier("value")))]))]),AccessBlock(Private,[SimpleDeclaration(Some("var"),Identifier("value_"),SimpleType("value_type"),None)])]))])
Index: branches/scool-ng/tests/examples/scool_src/container_1.scl
===================================================================
--- branches/scool-ng/tests/examples/scool_src/container_1.scl (revision 134)
+++ branches/scool-ng/tests/examples/scool_src/container_1.scl (revision 135)
@@ -5,7 +5,7 @@
value_type : type = T;
get : () -> value_type = { -> value; }
- mutable set : (value : value_type) = { value_ = value; }
+ mutable set : (value : value_type) -> void = { value_ = value; }
}
private