Skip to content

Commit

Permalink
remove weird loop from handle_efields. tests still pass, let's see wh…
Browse files Browse the repository at this point in the history
…at travis has to say.
  • Loading branch information
nadako committed Aug 15, 2017
1 parent 97719d1 commit 36ea42d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/typing/typer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2531,14 +2531,8 @@ and handle_efield ctx e p mode =
and resolve the rest of the field chain against its statics, or the type itself
if the rest of chain is empty *)
let def() =
try
let e = type_type ctx (pack,name) p in
fields path (fun _ -> AKExpr e)
with
Error (Module_not_found m,_) when m = (pack,name) ->
(* TODO: wtf? we prepend the rest of the chain to the beginning of the package path and try again?
what's this supposed to do? *)
loop ((List.rev path) @ x :: acc) []
let e = type_type ctx (pack,name) p in
fields path (fun _ -> AKExpr e)
in

match path with
Expand Down

2 comments on commit 36ea42d

@nadako
Copy link
Member Author

@nadako nadako commented on 36ea42d Aug 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added 12 years ago in 5f38525 and looks like leftover in current field handling code (at least as far as I can read it).

@nadako
Copy link
Member Author

@nadako nadako commented on 36ea42d Aug 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, this somehow made return untyped __global__.String(inPtr.ptr,inLen); work on cpp, which now fails. What I'm not sure about is how did it work before, this needs more research.

PS all other tests pass successfully

Please sign in to comment.