HaxeDoc2

(やまだぃちぅ) #1
6.If the current class has a static field namedi, resolve to it and halt.

7.If an enum constructor namediis declared on an imported enum, resolve to it and halt.

8.If a static namediis explicitly imported, resolve to it and halt.

9.Ifistarts with a lower-case character, go to 11.

10.If a type namediis available, resolve to it and halt.

11.If the expression is not in untyped mode, go to 14

12.Ifiequals__this__, resolve to thethisconstant and halt.

13.Generate a local variable namedi, resolve to it and halt.

14.Fail

For step 10 , it is also necessary to define the resolution order of types:

1.If a type namediis imported (directly or as part of a module), resolve to it and halt.

2.If the current package contains a module namediwith a type namedi, resolve to it and
halt.

3.If a type namediis available at top-level, resolve to it and halt.

4.Fail

For step 1 of this algorithm as well as steps 5 and 7 of the previous one, the order of import
resolution is important:



  • Imported modules and static extensions are checked from bottom to top with the first match
    being picked.

  • Within a given module, types are checked from top to bottom.

  • For imports, a match is made if the name equals.

  • For static extensions (6.3), a match is made if the name equals and the first argument unifies
    (3.5). Within a given type being used as static extension, the fields are checked from top to
    bottom.

Free download pdf