TypeDefinition constructor

TypeDefinition(
  1. String name,
  2. {String? subtype,
  3. bool isAmbiguous = false,
  4. Node? astNode}
)

Implementation

TypeDefinition(this.name,
    {this.subtype, this.isAmbiguous = false, Node? astNode}) {
  if (subtype == null) {
    _isPrimitive = isPrimitiveType(name);
    if (name == 'int' && isASTLiteralDouble(astNode)) {
      name = 'double';
    }
  } else {
    _isPrimitive = isPrimitiveType('$name<$subtype>');
  }
}