Commit ed89b9a5 authored by stancakapost's avatar stancakapost
Browse files

Constant expressions initializing constants, which are used in type and array...

Constant expressions initializing constants, which are used in type and array definitions, shall only contain literals, predefined functions except of rnd
parent 36d58d80
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7,11 +7,13 @@
module NegSem_10_Constants_001 {

    const float c_i := rnd(314E-2);
    type float MyFloat (c_i);
    
    type component GeneralComp {}
    
    testcase TC_NegSem_10_Constants_001() runs on GeneralComp {
        log(c_i);
        var MyFloat v_f := c_i;
        log(v_f);
        setverdict(pass);
    }