Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
dmd.typesem
Compiler implementation of the
D programming language.
Authors:
License:
Source typesem.d
Documentation https://dlang.org/phobos/dmd_typesem.html
- Type
typeSemantic(Typet, Locloc, Scope*sc); - Perform semantic analysis on a type.Parameters:
Type tType AST node Loc locthe location of the type Scope* sccontext Returns:Type with completed semantic analysis, Terror if errors were encountered - Type
merge(Typetype); - If an identical type to
typeis intype.stringtable, return the latter one. Otherwise, add it totype.stringtable. Some types don't get merged and are returned as-is.Parameters:Type typeType to check against existing types Returns:the type that was merged - Expression
getProperty(Typet, ref const Locloc, Identifierident, intflag); - Calculate built-in properties which just the type is necessary.Parameters:
Type tthe type for which the property is calculated Loc locthe location where the property is encountered Identifier identthe identifier of the property int flagif flag & 1, don't report "not a property" error and just return NULL. - void
resolve(Typemt, ref const Locloc, Scope*sc, Expression*pe, Type*pt, Dsymbol*ps, boolintypeid= false); - Resolve type 'mt' to either type, symbol, or expression. If errors happened, resolved to Type.terror.Parameters:
Type mttype to be resolved Loc locthe location where the type is encountered Scope* scthe scope of the type Expression* peis set if t is an expression Type* ptis set if t is a type Dsymbol* psis set if t is a symbol bool intypeidtrue if in type id - Expression
dotExp(Typemt, Scope*sc, Expressione, Identifierident, intflag); - Access the members of the object e. This type is same as e.type.Parameters:
Type mttype for which the dot expression is used Scope* scinstantiating scope Expression eexpression to convert Identifier identidentifier being used int flagDotExpFlag bit flags Returns:resulting expression with e.ident resolved - Expression
defaultInit(Typemt, ref const Locloc); - Get the the default initialization expression for a type.Parameters:
Type mtthe type for which the init expression is returned Loc locthe location where the expression needs to be evaluated Returns:The initialization expression for the type.
Copyright © 1999-2018 by the D Language Foundation | Page generated by
Ddoc on Thu Nov 1 12:28:38 2018