private static void setAttrType(Analyzer analyzer, AttributeAccess attr, DataType targetType, DataType attrType)
{
if (targetType.isUnknownType())
{
analyzer.putProblem(attr, "Can't set attribute for UnknownType");
return;
}
ISet<Binding> bs = targetType.Table.LookupAttribute(attr.FieldName.Name);
if (bs != null)
{
analyzer.addRef(attr, targetType, bs);
}
targetType.Table.Insert(analyzer, attr.FieldName.Name, attr, attrType, BindingKind.ATTRIBUTE);
}