bmw-software-engineering / trlc

Treat Requirements Like Code
GNU General Public License v3.0
55 stars 9 forks source link

ICE error message provided, but should not #69

Closed phiwuu closed 4 months ago

phiwuu commented 8 months ago

In the context of https://github.com/bmw-software-engineering/trlc/pull/64 an odd error message has been detected (see here):

error: on resolving references, types do not match; expected RE, got R | please report this to https://github.com/bmw-software-engineering/trlc/issues

The error message is correct, but the remark to report this problem to https://github.com/bmw-software-engineering/trlc/issues is wrong.

Steps to reproduce: rsl file:

package Foo

type R {
    a Integer
}

type RE extends R {
    b Integer
}

type Potato {
    ref R[1..*]
}

type Kitten {
    ref RE[1..*]
}

trlc file:

package Foo

R Tiger {
    a = 1
}

RE Lion {
    a = 1
    b = 2
}

Potato Bar {
    ref = [Tiger, Lion]
}

Kitten Sonic {
    ref = [Tiger, Lion]
}

Apparently the error is interpreted as inter-compiler exception, although it is a regular trlc error due to invalid references in the TRLC file.

florianschanda commented 4 months ago

I have fixed this. The error was right, the severity was not.