scool r122: Add reference files for tests on functions

From: Maxime van Noppen <yabo@lrde.epita.fr> To: transformers-patches@lrde.epita.fr, olena-patches@lrde.epita.fr Subject: scool r122: Add reference files for tests on functions URL: https://svn.lrde.epita.fr/svn/scool/branches/scool-ng ChangeLog: 2008-10-30 Maxime van Noppen <yabo@lrde.epita.fr> Add reference files for tests on functions. * function/c++_build/call_001.g++: New. * function/c++_build/call_002.g++: New. * function/c++_build/call_003.g++: New. * function/c++_build/call_004.g++: New. * function/c++_build/call_005.g++: New. * function/c++_build/call_006.g++: New. * function/c++_build/declaration_003.g++: New. * function/c++_build/declaration_004.g++: New. * function/c++_build/definition_002.g++: New. * function/c++_ast/call_001.aterm, * function/c++_ast/call_002.aterm, * function/c++_ast/call_003.aterm, * function/c++_ast/call_004.aterm, * function/c++_ast/call_005.aterm, * function/c++_ast/call_006.aterm, * function/c++_ast/declaration_003.aterm, * function/c++_ast/declaration_004.aterm, * function/c++_ast/definition_002.aterm, * function/c++_src/call_001.cc, * function/c++_src/call_002.cc, * function/c++_src/call_003.cc, * function/c++_src/call_004.cc, * function/c++_src/call_005.cc, * function/c++_src/call_006.cc, * function/c++_src/declaration_003.cc, * function/c++_src/declaration_004.cc, * function/c++_src/definition_002.cc, * function/scool_ast/call_001.aterm, * function/scool_ast/call_002.aterm, * function/scool_ast/call_003.aterm, * function/scool_ast/call_004.aterm, * function/scool_ast/call_005.aterm, * function/scool_ast/call_006.aterm, * function/scool_ast/declaration_003.aterm, * function/scool_ast/declaration_004.aterm, * function/scool_ast/definition_002.aterm, * function/scool_src/call_001.scl, * function/scool_src/call_002.scl, * function/scool_src/call_003.scl, * function/scool_src/call_004.scl, * function/scool_src/call_005.scl, * function/scool_src/call_006.scl, * function/scool_src/declaration_003.scl, * function/scool_src/declaration_004.scl, * function/scool_src/definition_002.scl: Here. --- c++_ast/call_001.aterm | 2 +- c++_ast/call_002.aterm | 2 +- c++_ast/call_003.aterm | 2 +- c++_ast/call_004.aterm | 2 +- c++_ast/call_005.aterm | 2 +- c++_ast/call_006.aterm | 2 +- c++_ast/declaration_003.aterm | 2 +- c++_ast/declaration_004.aterm | 2 +- c++_ast/definition_002.aterm | 2 +- c++_src/call_001.cc | 2 +- c++_src/call_002.cc | 4 ++-- c++_src/call_003.cc | 8 ++++++-- c++_src/call_004.cc | 2 ++ c++_src/call_005.cc | 2 ++ c++_src/call_006.cc | 2 ++ c++_src/declaration_003.cc | 1 + c++_src/declaration_004.cc | 1 + c++_src/definition_002.cc | 2 +- scool_ast/call_001.aterm | 2 +- scool_ast/call_002.aterm | 2 +- scool_ast/call_003.aterm | 2 +- scool_ast/call_004.aterm | 2 +- scool_ast/call_005.aterm | 2 +- scool_ast/call_006.aterm | 2 +- scool_ast/declaration_003.aterm | 2 +- scool_ast/declaration_004.aterm | 2 +- scool_ast/definition_002.aterm | 2 +- scool_src/call_001.scl | 2 +- scool_src/call_002.scl | 4 ++-- scool_src/call_003.scl | 10 ++++++++-- scool_src/call_004.scl | 2 ++ scool_src/call_005.scl | 2 ++ scool_src/call_006.scl | 2 ++ scool_src/declaration_003.scl | 2 ++ scool_src/declaration_004.scl | 2 ++ scool_src/definition_002.scl | 2 +- 36 files changed, 58 insertions(+), 30 deletions(-) Index: branches/scool-ng/tests/function/c++_ast/declaration_004.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/declaration_004.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/declaration_004.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),None,[]),CxxFun([],CxxType("float"),CxxId("foo"),None,[(CxxType("int"),CxxId("arg1"))]),CxxFun([],CxxType("char"),CxxId("foo"),None,[(CxxConstType(CxxRefType(CxxType("toto"))),CxxId("arg1")),(CxxRefType(CxxType("double")),CxxId("arg2"))])]) +CxxProgram([CxxClassDecl([],CxxId("toto"),[]),CxxFun([],CxxType("void"),CxxId("foo"),None,[]),CxxFun([],CxxType("float"),CxxId("foo"),None,[(CxxType("int"),CxxId("arg1"))]),CxxFun([],CxxType("char"),CxxId("foo"),None,[(CxxConstType(CxxRefType(CxxType("toto"))),CxxId("arg1")),(CxxRefType(CxxType("double")),CxxId("arg2"))])]) Index: branches/scool-ng/tests/function/c++_ast/definition_002.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/definition_002.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/definition_002.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("answer"),[],None,[CxxDecl(CxxConstType(CxxType("int")),CxxId("i"))])]) +CxxProgram([CxxFun([],CxxType("void"),CxxId("answer"),[],None,[CxxDecl(CxxConstType(CxxType("int")),CxxId("i"),CxxInt("42"))])]) Index: branches/scool-ng/tests/function/c++_ast/call_001.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/call_001.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/call_001.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("foo"),[]))])]) +CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("doit"),[]))])]) Index: branches/scool-ng/tests/function/c++_ast/call_002.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/call_002.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/call_002.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("foo"),[CxxInt("42")]))])]) +CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[(CxxType("int"),CxxId("i"))],None,[CxxExpStm(CxxFunCall([],CxxId("doit"),[CxxInt("42")]))])]) Index: branches/scool-ng/tests/function/c++_ast/call_003.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/call_003.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/call_003.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("foo"),["bar",CxxInt("42")]))])]) +CxxProgram([CxxProgram("#include <string>\n\nusing std::string;\n"),CxxFun([],CxxType("void"),CxxId("doit"),[(CxxConstType(CxxRefType(CxxType("string"))),CxxId("s")),(CxxType("int"),CxxId("i"))],None,[CxxExpStm(CxxFunCall([],CxxId("doit"),["\"bar\"",CxxInt("42")]))])]) Index: branches/scool-ng/tests/function/c++_ast/call_004.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/call_004.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/call_004.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxType("int")],CxxId("foo"),[]))])]) +CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("foo"),None,[]),CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxType("int")],CxxId("foo"),[]))])]) Index: branches/scool-ng/tests/function/c++_ast/call_005.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/call_005.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/call_005.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxInt("42")],CxxId("foo"),[]))])]) +CxxProgram([CxxFun([(CxxType("int"),CxxId("i"))],CxxType("void"),CxxId("foo"),None,[]),CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxInt("42")],CxxId("foo"),[]))])]) Index: branches/scool-ng/tests/function/c++_ast/call_006.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/call_006.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/call_006.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxType("int"),CxxInt("42")],CxxId("foo"),[CxxInt("42")]))])]) +CxxProgram([CxxFun([(CxxType("typename"),CxxId("T")),(CxxType("int"),CxxId("i"))],CxxType("void"),CxxId("foo"),None,[(CxxType("int"),CxxId("j"))]),CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxType("int"),CxxInt("42")],CxxId("foo"),[CxxInt("42")]))])]) Index: branches/scool-ng/tests/function/c++_ast/declaration_003.aterm =================================================================== --- branches/scool-ng/tests/function/c++_ast/declaration_003.aterm (revision 121) +++ branches/scool-ng/tests/function/c++_ast/declaration_003.aterm (revision 122) @@ -1 +1 @@ -CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),None,[(CxxType("int"),CxxId("a")),(CxxConstType(CxxRefType(CxxType("bar"))),CxxId("b"))])]) +CxxProgram([CxxClassDecl([],CxxId("bar"),[]),CxxFun([],CxxType("void"),CxxId("foo"),None,[(CxxType("int"),CxxId("a")),(CxxConstType(CxxRefType(CxxType("bar"))),CxxId("b"))])]) Index: branches/scool-ng/tests/function/c++_src/call_001.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/call_001.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/call_001.cc (revision 122) @@ -1,4 +1,4 @@ void doit() { - foo(); + doit(); } Index: branches/scool-ng/tests/function/c++_src/call_002.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/call_002.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/call_002.cc (revision 122) @@ -1,4 +1,4 @@ -void doit() +void doit(int i) { - foo(42); + doit(42); } Index: branches/scool-ng/tests/function/c++_src/call_003.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/call_003.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/call_003.cc (revision 122) @@ -1,4 +1,8 @@ -void doit() +#include <string> + +using std::string; + +void doit(const string& s, int i) { - foo(bar, 42); + doit("bar", 42); } Index: branches/scool-ng/tests/function/c++_src/call_004.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/call_004.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/call_004.cc (revision 122) @@ -1,3 +1,5 @@ +template < typename T > +void foo(); void doit() { foo< int >(); Index: branches/scool-ng/tests/function/c++_src/call_005.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/call_005.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/call_005.cc (revision 122) @@ -1,3 +1,5 @@ +template < int i > +void foo(); void doit() { foo< 42 >(); Index: branches/scool-ng/tests/function/c++_src/call_006.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/call_006.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/call_006.cc (revision 122) @@ -1,3 +1,5 @@ +template < typename T, int i > +void foo(int j); void doit() { foo< int, 42 >(42); Index: branches/scool-ng/tests/function/c++_src/declaration_003.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/declaration_003.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/declaration_003.cc (revision 122) @@ -1 +1,2 @@ +class bar; void foo(int a, const bar& b); Index: branches/scool-ng/tests/function/c++_src/declaration_004.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/declaration_004.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/declaration_004.cc (revision 122) @@ -1,3 +1,4 @@ +class toto; void foo(); float foo(int arg1); char foo(const toto& arg1, double& arg2); Index: branches/scool-ng/tests/function/c++_src/definition_002.cc =================================================================== --- branches/scool-ng/tests/function/c++_src/definition_002.cc (revision 121) +++ branches/scool-ng/tests/function/c++_src/definition_002.cc (revision 122) @@ -1,4 +1,4 @@ void answer() { - const int i; + const int i = 42; } Index: branches/scool-ng/tests/function/scool_ast/declaration_004.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/declaration_004.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/declaration_004.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("int"))]),SimpleType("float"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("toto")),TypedId(Identifier("arg2"),ReferenceType(SimpleType("double")))]),SimpleType("char")))]) +Program([ClassDeclaration(Some("final"),Identifier("toto"),None),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("int"))]),SimpleType("float"))),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("arg1"),SimpleType("toto")),TypedId(Identifier("arg2"),ReferenceType(SimpleType("double")))]),SimpleType("char")))]) Index: branches/scool-ng/tests/function/scool_ast/definition_002.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/definition_002.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/definition_002.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("answer"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([SimpleDeclaration(None,Identifier("i"),SimpleType("int"),None)]))]) +Program([FunctionDefinition(None,Identifier("answer"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([SimpleDeclaration(None,Identifier("i"),SimpleType("int"),Some(Initialiser(Integer("42"))))]))]) Index: branches/scool-ng/tests/function/scool_ast/call_001.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/call_001.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/call_001.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),None,Arguments([])))]))]) +Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("doit"),None,Arguments([])))]))]) Index: branches/scool-ng/tests/function/scool_ast/call_002.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/call_002.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/call_002.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),None,Arguments([Integer("42")])))]))]) +Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("i"),SimpleType("int"))]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("doit"),None,Arguments([Integer("42")])))]))]) Index: branches/scool-ng/tests/function/scool_ast/call_003.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/call_003.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/call_003.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),None,Arguments([String("\"bar\""),Integer("42")])))]))]) +Program([Cxx("#include <string>\n\nusing std::string;\n"),FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("s"),SimpleType("string")),TypedId(Identifier("i"),SimpleType("int"))]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("doit"),None,Arguments([String("\"bar\""),Integer("42")])))]))]) Index: branches/scool-ng/tests/function/scool_ast/call_004.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/call_004.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/call_004.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),Some(Parameters([SimpleType("int")])),Arguments([])))]))]) +Program([FunctionDeclaration(None,Identifier("foo"),FunctionType(Some(ParametersDeclaration([TypedId(Identifier("T"),"type")])),ArgumentsDeclaration([]),SimpleType("void"))),FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),Some(Parameters([SimpleType("int")])),Arguments([])))]))]) Index: branches/scool-ng/tests/function/scool_ast/call_005.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/call_005.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/call_005.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),Some(Parameters([Integer("42")])),Arguments([])))]))]) +Program([FunctionDeclaration(None,Identifier("foo"),FunctionType(Some(ParametersDeclaration([TypedId(Identifier("i"),SimpleType("int"))])),ArgumentsDeclaration([]),SimpleType("void"))),FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),Some(Parameters([Integer("42")])),Arguments([])))]))]) Index: branches/scool-ng/tests/function/scool_ast/call_006.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/call_006.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/call_006.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),Some(Parameters([SimpleType("int"),Integer("42")])),Arguments([Integer("42")])))]))]) +Program([FunctionDeclaration(None,Identifier("foo"),FunctionType(Some(ParametersDeclaration([TypedId(Identifier("T"),"type"),TypedId(Identifier("i"),SimpleType("int"))])),ArgumentsDeclaration([TypedId(Identifier("j"),SimpleType("int"))]),SimpleType("void"))),FunctionDefinition(None,Identifier("doit"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(FunctionCall(Identifier("foo"),Some(Parameters([SimpleType("int"),Integer("42")])),Arguments([Integer("42")])))]))]) Index: branches/scool-ng/tests/function/scool_ast/declaration_003.aterm =================================================================== --- branches/scool-ng/tests/function/scool_ast/declaration_003.aterm (revision 121) +++ branches/scool-ng/tests/function/scool_ast/declaration_003.aterm (revision 122) @@ -1 +1 @@ -Program([FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("a"),SimpleType("int")),TypedId(Identifier("b"),SimpleType("bar"))]),SimpleType("void")))]) +Program([ClassDeclaration(Some("final"),Identifier("bar"),None),FunctionDeclaration(None,Identifier("foo"),FunctionType(None,ArgumentsDeclaration([TypedId(Identifier("a"),SimpleType("int")),TypedId(Identifier("b"),SimpleType("bar"))]),SimpleType("void")))]) Index: branches/scool-ng/tests/function/scool_src/call_005.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/call_005.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/call_005.scl (revision 122) @@ -1,3 +1,5 @@ +foo : [i : int]() -> void; + doit : () -> void = { foo[42](); Index: branches/scool-ng/tests/function/scool_src/call_006.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/call_006.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/call_006.scl (revision 122) @@ -1,3 +1,5 @@ +foo : [T : type, i : int](j : int) -> void; + doit : () -> void = { foo[int, 42](42); Index: branches/scool-ng/tests/function/scool_src/declaration_003.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/declaration_003.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/declaration_003.scl (revision 122) @@ -1 +1,3 @@ +final bar : class; + foo : (a : int, b : bar) -> void; Index: branches/scool-ng/tests/function/scool_src/declaration_004.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/declaration_004.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/declaration_004.scl (revision 122) @@ -1,3 +1,5 @@ +final toto : class; + foo : () -> void; foo : (arg1 : int) -> float; foo : (arg1 : toto, arg2 : ref double) -> char; Index: branches/scool-ng/tests/function/scool_src/definition_002.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/definition_002.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/definition_002.scl (revision 122) @@ -1,4 +1,4 @@ answer : () -> void = { - i : int; + i : int = 42; } Index: branches/scool-ng/tests/function/scool_src/call_001.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/call_001.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/call_001.scl (revision 122) @@ -1,4 +1,4 @@ doit : () -> void = { - foo(); + doit(); } Index: branches/scool-ng/tests/function/scool_src/call_002.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/call_002.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/call_002.scl (revision 122) @@ -1,4 +1,4 @@ -doit : () -> void = +doit : (i : int) -> void = { - foo(42); + doit(42); } Index: branches/scool-ng/tests/function/scool_src/call_003.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/call_003.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/call_003.scl (revision 122) @@ -1,4 +1,10 @@ -doit : () -> void = +|[ +#include <string> + +using std::string; +]| + +doit : (s : string, i : int) -> void = { - foo("bar", 42); + doit("bar", 42); } Index: branches/scool-ng/tests/function/scool_src/call_004.scl =================================================================== --- branches/scool-ng/tests/function/scool_src/call_004.scl (revision 121) +++ branches/scool-ng/tests/function/scool_src/call_004.scl (revision 122) @@ -1,3 +1,5 @@ +foo : [T : type] () -> void; + doit : () -> void = { foo[int](); Index: branches/scool-ng/tests/function/c++_build/declaration_003.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/declaration_004.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/definition_002.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/call_001.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/call_002.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/call_003.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/call_004.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/call_005.g++ =================================================================== Index: branches/scool-ng/tests/function/c++_build/call_006.g++ ===================================================================
participants (1)
-
Maxime van Noppen