HaxeFoundation / HaxeFoundation/hx3compat

[haxe.web.Dispatch] Configuration entry should be a function

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
17
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Hej !

I get this compilte-time error "Configuration entry should be a function", just because I've a simple field named "documents", so it takes the "do" as an API function.
I solved this by adding that into the `if`statement : `|| ( f.name.substr( 2, 1 ) != null && f.name.substr( 2, 1 ) == f.name.substr( 2, 1 ).toLowerCase() )`
here : https://github.com/HaxeFoundation/hx3compat/blob/91edf63bfd82d0d110a51c96028905b962c7968e/std/haxe/web/Dispatch.hx#L397

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in std/haxe/web/Dispatch.hx around line 397, where configuration fields are checked and the `documents` field is mistaken for an API function. Review the reported condition and verify that fields whose names do not represent API functions are accepted. Done means the compile-time error no longer occurs for this configuration.

Written by the indexing model from the issue text.

Assessment

Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.