Adam Cameron
import
is respected. Pseudo code "repro":
// some/directory/to/FTP.cfc
component {
public static struct function adapter() {
return {}
}
}
// 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:
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.dswitzer
04/08/2022, 11:32 AMAdam Cameron