private ArrayCopyMethod copy_method;
public ArrayType (DataType element_type, int rank, SourceReference? source_reference = null) {
- base (null);
+ base (null, source_reference);
this.element_type = element_type;
this.rank = rank;
- this.source_reference = source_reference;
}
public override Symbol? get_member (string member_name) {
* A boolean type.
*/
public class Vala.BooleanType : ValueType {
- public BooleanType (Struct type_symbol) {
- base (type_symbol);
+ public BooleanType (Struct type_symbol, SourceReference? source_reference = null) {
+ base (type_symbol, source_reference);
}
public override DataType copy () {
- var result = new BooleanType ((Struct) type_symbol);
- result.source_reference = source_reference;
+ var result = new BooleanType ((Struct) type_symbol, source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
return result;
}
}
- protected CallableType (Symbol symbol) {
- base.with_symbol (symbol);
+ protected CallableType (Symbol symbol, SourceReference? source_reference = null) {
+ base.with_symbol (symbol, source_reference);
}
public override bool is_invokable () {
}
}
- public ClassType (Class class_symbol) {
- base (class_symbol);
+ public ClassType (Class class_symbol, SourceReference? source_reference = null) {
+ base (class_symbol, source_reference);
}
public override DataType copy () {
private List<DataType> type_argument_list;
private static List<DataType> _empty_type_list;
- protected DataType.with_symbol (Symbol? symbol) {
+ protected DataType.with_symbol (Symbol? symbol, SourceReference? source_reference = null) {
this.symbol = symbol;
+ this.source_reference = source_reference;
}
/**
DelegateTargetField? target_field;
DelegateDestroyField? destroy_field;
- public DelegateType (Delegate delegate_symbol) {
- base (delegate_symbol);
+ public DelegateType (Delegate delegate_symbol, SourceReference? source_reference = null) {
+ base (delegate_symbol, source_reference);
this.is_called_once = (delegate_symbol.get_attribute_string ("CCode", "scope") == "async");
}
}
public override DataType copy () {
- var result = new DelegateType (delegate_symbol);
- result.source_reference = source_reference;
+ var result = new DelegateType (delegate_symbol, source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
public class Vala.EnumValueType : ValueType {
private Method? to_string_method;
- public EnumValueType (Enum type_symbol) {
- base (type_symbol);
+ public EnumValueType (Enum type_symbol, SourceReference? source_reference = null) {
+ base (type_symbol, source_reference);
}
public override DataType copy () {
- var result = new EnumValueType ((Enum) type_symbol);
- result.source_reference = source_reference;
+ var result = new EnumValueType ((Enum) type_symbol, source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
public bool dynamic_error { get; set; }
public ErrorType (ErrorDomain? error_domain, ErrorCode? error_code, SourceReference? source_reference = null) {
- base ((Symbol) error_domain ?? CodeContext.get ().root.scope.lookup ("GLib").scope.lookup ("Error"));
+ base ((Symbol) error_domain ?? CodeContext.get ().root.scope.lookup ("GLib").scope.lookup ("Error"), source_reference);
this.error_code = error_code;
- this.source_reference = source_reference;
}
public override bool compatible (DataType target_type) {
}
}
- public FieldPrototype (Field field_symbol) {
- base.with_symbol (field_symbol);
+ public FieldPrototype (Field field_symbol, SourceReference? source_reference = null) {
+ base.with_symbol (field_symbol, source_reference);
}
public override DataType copy () {
- var result = new FieldPrototype (field_symbol);
+ var result = new FieldPrototype (field_symbol, source_reference);
return result;
}
* A floating-point type.
*/
public class Vala.FloatingType : ValueType {
- public FloatingType (Struct type_symbol) {
- base (type_symbol);
+ public FloatingType (Struct type_symbol, SourceReference? source_reference = null) {
+ base (type_symbol, source_reference);
}
public override DataType copy () {
- var result = new FloatingType ((Struct) type_symbol);
- result.source_reference = source_reference;
+ var result = new FloatingType ((Struct) type_symbol, source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
return result;
GenericDupField? dup_field;
GenericDestroyField? destroy_field;
- public GenericType (TypeParameter type_parameter) {
+ public GenericType (TypeParameter type_parameter, SourceReference? source_reference = null) {
this.type_parameter = type_parameter;
+ this.source_reference = source_reference;
// type parameters are always considered nullable
this.nullable = true;
}
string? literal_value;
string? literal_type_name;
- public IntegerType (Struct type_symbol, string? literal_value = null, string? literal_type_name = null) {
- base (type_symbol);
+ public IntegerType (Struct type_symbol, string? literal_value = null, string? literal_type_name = null, SourceReference? source_reference = null) {
+ base (type_symbol, source_reference);
this.literal_value = literal_value;
this.literal_type_name = literal_type_name;
}
public override DataType copy () {
- var result = new IntegerType ((Struct) type_symbol, literal_value, literal_type_name);
- result.source_reference = source_reference;
+ var result = new IntegerType ((Struct) type_symbol, literal_value, literal_type_name, source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
return result;
}
}
- public InterfaceType (Interface interface_symbol) {
- base (interface_symbol);
+ public InterfaceType (Interface interface_symbol, SourceReference? source_reference = null) {
+ base (interface_symbol, source_reference);
}
public override DataType copy () {
- var result = new InterfaceType (interface_symbol);
+ var result = new InterfaceType (interface_symbol, source_reference);
result.source_reference = source_reference;
result.value_owned = value_owned;
result.nullable = nullable;
}
}
- public MethodType (Method method_symbol) {
- base (method_symbol);
+ public MethodType (Method method_symbol, SourceReference? source_reference = null) {
+ base (method_symbol, source_reference);
}
public override DataType copy () {
- return new MethodType (method_symbol);
+ return new MethodType (method_symbol, source_reference);
}
public override bool compatible (DataType target_type) {
*/
public class Vala.NullType : ReferenceType {
public NullType (SourceReference? source_reference = null) {
- base (null);
+ base (null, source_reference);
this.nullable = true;
- this.source_reference = source_reference;
}
public override bool compatible (DataType target_type) {
}
}
- public ObjectType (ObjectTypeSymbol type_symbol) {
- base (type_symbol);
+ public ObjectType (ObjectTypeSymbol type_symbol, SourceReference? source_reference = null) {
+ base (type_symbol, source_reference);
}
public override DataType copy () {
}
public override DataType copy () {
- return new PointerType (base_type.copy ());
+ return new PointerType (base_type.copy (), source_reference);
}
public override bool compatible (DataType target_type) {
}
}
- public PropertyPrototype (Property property_symbol) {
- base.with_symbol (property_symbol);
+ public PropertyPrototype (Property property_symbol, SourceReference? source_reference = null) {
+ base.with_symbol (property_symbol, source_reference);
}
public override DataType copy () {
- var result = new PropertyPrototype (property_symbol);
+ var result = new PropertyPrototype (property_symbol, source_reference);
return result;
}
* A reference type, i.e. a class, interface, or array type.
*/
public abstract class Vala.ReferenceType : DataType {
- protected ReferenceType (Symbol? symbol) {
- base.with_symbol (symbol);
+ protected ReferenceType (Symbol? symbol, SourceReference? source_reference = null) {
+ base.with_symbol (symbol, source_reference);
}
}
Method? connect_after_method;
Method? disconnect_method;
- public SignalType (Signal signal_symbol) {
- base (signal_symbol);
+ public SignalType (Signal signal_symbol, SourceReference? source_reference = null) {
+ base (signal_symbol, source_reference);
}
public override DataType copy () {
- return new SignalType (signal_symbol);
+ return new SignalType (signal_symbol, source_reference);
}
public override bool compatible (DataType target_type) {
* A struct value type.
*/
public class Vala.StructValueType : ValueType {
- public StructValueType (Struct type_symbol) {
- base (type_symbol);
+ public StructValueType (Struct type_symbol, SourceReference? source_reference = null) {
+ base (type_symbol, source_reference);
}
public override bool is_invokable () {
}
public override DataType copy () {
- var result = new StructValueType ((Struct) type_symbol);
- result.source_reference = source_reference;
+ var result = new StructValueType ((Struct) type_symbol, source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
*/
public UnresolvedSymbol unresolved_symbol { get; set; }
- public UnresolvedType () {
+ public UnresolvedType (SourceReference? source_reference = null) {
+ this.source_reference = source_reference;
}
/**
* @param source reference to source code
* @return newly created type reference
*/
- public UnresolvedType.from_symbol (UnresolvedSymbol symbol, SourceReference? source = null) {
+ public UnresolvedType.from_symbol (UnresolvedSymbol symbol, SourceReference? source_reference = null) {
this.unresolved_symbol = symbol;
- source_reference = source;
+ this.source_reference = source_reference;
}
/**
}
public override DataType copy () {
- var result = new UnresolvedType ();
- result.source_reference = source_reference;
+ var result = new UnresolvedType (source_reference);
result.value_owned = value_owned;
result.nullable = nullable;
result.is_dynamic = is_dynamic;
* A value type, i.e. a struct or an enum type.
*/
public abstract class Vala.ValueType : DataType {
- protected ValueType (TypeSymbol type_symbol) {
- base.with_symbol (type_symbol);
+ protected ValueType (TypeSymbol type_symbol, SourceReference? source_reference = null) {
+ base.with_symbol (type_symbol, source_reference);
}
public override bool is_disposable () {