Opened 8 years ago
Closed 8 years ago
#3995 closed defect (fixed)
Union types with type variables cannot index record members
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.11.0 |
Component: | MetaModelica | Version: | v1.11.0 |
Keywords: | Cc: |
Description
Union types indexing a record variable loses the type variables in the type:
loadString(" encapsulated uniontype DE<T> record DER T t; end DER; end DE; uniontype Union record R DE<Integer> de; end R; end Union; function f input Union un; protected DE<Integer> i; algorithm i := un.de; end f; "); r := R(DE.DER(1)); getErrorString(); f(r); getErrorString();
Error: Type mismatch in assignment in i := un.de of DE<#Integer> := DE.DER
Change History (2)
comment:1 by , 8 years ago
Status: | new → accepted |
---|
comment:2 by , 8 years ago
Milestone: | Future → 1.11.0 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in c06dade