RecordFlux
RecordFlux copied to clipboard
Uncompilable code when naming type after package
When using a type which has the same name as the containing package as a session variable, the resulting code does not compile:
package Conflict is
type Conflict is mod 2 ** 8;
generic
session Session with
Initial => Start,
Final => Error
is
X : Conflict;
begin
state Start
is
begin
X := 42;
transition
goto Error
end Start;
state Error is null state;
end Session;
end Conflict;
Compile
[Ada] rflx-conflict-session.adb
rflx-conflict-session.ads:65:08: error: invalid prefix in selected component "Conflict"