Dan Korostelev 8 anni fa
parent
commit
1818be6e11
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      src/typing/typer.ml

+ 7 - 0
src/typing/typer.ml

@@ -2484,6 +2484,13 @@ and handle_efield ctx e p mode =
 		resolve it into an `access_mode->access_kind` getter for the resolved expression
 	*)
 	let type_path path =
+		(*
+			this is an actual loop for processing a fully-qualified dot-path.
+			it relies on the fact that packages start with a lowercase letter, while modules and types
+			start with upper-case letters, so it processes path parts, accumulating lowercase package parts in `acc`,
+			until it encounters an upper-case part, which can mean either a module access or module's primary type access,
+			so it tries to figure out the type and and calls `fields` on it to resolve the rest of field access chain.
+		*)
 		let rec loop acc path =
 			match path with
 			| [] ->