Commit bddc406e authored by Matthias Simon's avatar Matthias Simon
Browse files

Add tests for automatic type for literals and return values

parent 02a4c371
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
 // @author   TTF23
 // @purpose  1:6.5, Ensure ArrayDef part is omitted for variables with automatic type inference.
 // @verdict  pass reject
module NegSem_0605_automatic_type_001 {

function f() {
	var x[2] := {1,2};
}

}
+8 −0
Original line number Diff line number Diff line
 // @author   TTF23
 // @purpose  1:6.5, Ensure ArrayDef part is omitted for constants with automatic type inference.
 // @verdict  pass reject
module NegSem_0605_automatic_type_002 {

const IP[4] := { 192, 168, 0, 1 };

}
+8 −0
Original line number Diff line number Diff line
 // @author   TTF23
 // @purpose  1:6.5, Ensure ambiguous types are rejected.
 // @verdict  pass reject
module NegSem_0605_automatic_type_003 {

const X := null;

}
+8 −0
Original line number Diff line number Diff line
 // @author   TTF23
 // @purpose  1:6.5, Ensure automatic type for *.
 // @verdict  pass reject
module NegSem_0605_literals_001 {

modulepar template mpar := *;

}
+8 −0
Original line number Diff line number Diff line
 // @author   TTF23
 // @purpose  1:6.5, Ensure automatic type for ?.
 // @verdict  pass reject
module NegSem_0605_literals_002 {

modulepar template mpar := ?

}
Loading