Possible bug with how `import` is respected. Pseud...
# lucee
a
Possible bug with how
import
is respected. Pseudo code "repro":
Copy code
// some/directory/to/FTP.cfc
component {
    public static struct function adapter() {
        return {}
    }
}
Copy code
// test/unit/some/directory/to/FtpTest.cfc
import testbox.system.BaseSpec
import some.directory.to.FTP

component extends=BaseSpec {

    function run() {
        describe("Tests FTP adapter", () => {
            it("should work...",  () => {
                result = FTP::adapter() // errors with "Component from type [org.lucee.cfml.Ftp] has no accessible static Member with name [adapter]"
                
                expect(result).toBe({})
            })
        })
    }
}
So it's looking for (and finding) a different Ftp (sic(*)) class, rather than my one. I would perhaps expect this if I did not have the literal
import
statement saying which one I meant. If I fully-qualify the usage, it's fine, eg:
Copy code
result = some.directory.to.FTP::adapter()
But I should not have to do that. The imports should take priority, That's what they for, right? (*) also as I'm on a case sensitive file system, it shouldn't even consider
Ftp
to be the same as
FTP
in the first place. That's not the same thing.
d
a
Oh yeah I know what's happening. Just that it shouldn't happen