﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5111	Got COMPILER BUG when compiling Modelica_Requirements (minimal example attached)	anatoly.trosinenko@…	somebody	"When compiling examples from the Modelica_Requirements library, I got the COMPILER BUG message. The example was then reduced to quite strangely looking model with setting pre() of a variable of enum type inside the `initial equation`. Not sure whether this is a correct Modelica code, but compiler asked to send a bug report. :)

== How to reproduce ==

Take the following `TestEnum.mo`:
{{{
#!modelica
model TestEnum
  type Property = enumeration(Undecided);
  Property localProperty;
initial equation
  pre(localProperty) = Property.Undecided;
end TestEnum;
}}}
And try to process it:
{{{
$ omc --version
OpenModelica 1.13.0~dev-1409-gd2ab68c
$ omc TestEnum.mo 
Error processing file: TestEnum.mo
[/home/trosinenko/TestEnum.mo:5:3-5:42:writable] Error: Got type mismatch error, but matching types enumeration(Undecided).
This is a ***COMPILER BUG***, please report it to https://trac.openmodelica.org/OpenModelica.
Error: Error occurred while flattening model TestEnum

# Error encountered! Exiting...
# Please check the error message and the flags.

Execution failed!
}}}

== What is expected ==

The model is either compiled or rejected with an explanation, without COMPILER BUG message."	defect	closed	normal	Future	*unknown*	v1.13.0-dev-nightly	fixed		
