Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Library Reference

version 2.112.0

overview

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 usinga local clone.

dmd.semantic3

Performs the semantic3 stage of semantic analysis, which finalizes function bodies and late semantic checks for templates, mixins, aggregates, and special members.
Authors:
Walter Bright
License:
Boost License 1.0

Sourcesemantic3.d

Documentationhttps://dlang.org/phobos/dmd_semantic3.html

Coveragehttps://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/semantic3.d

voidsemantic3(Dsymboldsym, Scope*sc);
Does semantic analysis on function bodies.
FuncDeclarationsearch_toString(StructDeclarationsd);
Search sd for a member function of the form:extern (D) string toString();
Parameters:
StructDeclarationsdstruct declaration to search
Returns:
FuncDeclaration oftoString() if found,null if not
voidsemanticTypeInfoMembers(StructDeclarationsd);
Ensures special members of a struct are fully analysed before the backend emits TypeInfo.
Handles late semantic analysis for members likeopEquals,opCmp,toString,toHash, postblit, and destructor.
boolcheckClosure(FuncDeclarationfd);
Determine whether the given function will need to allocate a closure_ and verify that such an allocation is allowed under the current compilation settings.
Whenever an error is emitted, every nested function that actually closes over a variable is listed in a supplemental diagnostic, together with the location of the captured variable’s declaration. (This extra walk is skipped when the compiler is gagged.)
See Also:
  • FuncDeclaration.needsClosure
  • FuncDeclaration.setGC
  • FuncDeclaration.printGCUsage
Copyright © 1999-2026 by theD Language Foundation | Page generated byDdoc on Fri Feb 20 17:56:34 2026

[8]ページ先頭

©2009-2026 Movatter.jp