mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
Handle multiple type assumptions with same var
This commit is contained in:
parent
23be70b57c
commit
44f862512d
@ -101,13 +101,15 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current type assumptions.
|
||||
* Returns the current type assumptions. If multiple type assumptions contain the same variable only the
|
||||
* oldest type assumption is returned. All other type assumptions are being ignored.
|
||||
*
|
||||
* @return the current type assumptions as mappings from a variable to a type
|
||||
*/
|
||||
protected Map<String, String> getTypeAssumptions() {
|
||||
return fields.stream()
|
||||
.collect(Collectors.toMap(TypeAssumptionField::getVariable, TypeAssumptionField::getType));
|
||||
.collect(Collectors.toMap(TypeAssumptionField::getVariable, TypeAssumptionField::getType,
|
||||
(existing, replacement) -> existing));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user