You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the blacklist in the recorder, the script wil contain the line:
.inferHtmlResources(black = BlackList(""".*\.css.*"""), white = WhiteList())
But the compiler in Eclipse (+ Scala IDE for Eclipse) complains:
ambiguous reference to overloaded definition, both method inferHtmlResources in class HttpProtocolBuilder of type (black: io.gatling.core.filter.BlackList, white: io.gatling.core.filter.WhiteList)io.gatling.http.config.HttpProtocolBuilder and method inferHtmlResources in class HttpProtocolBuilder of type (white: io.gatling.core.filter.WhiteList, black: io.gatling.core.filter.BlackList)io.gatling.http.config.HttpProtocolBuilder match argument types (black: io.gatling.core.filter.BlackList,white: io.gatling.core.filter.WhiteList)
When I leave the parameter names out of the method call, the compiler can resolve the correct overload by type:
Ah, a nice example where overloading and named parameters conflict with each other.
When parameters are "unnamed", it resolves to a call to either one of those overloaded versions of inferHtmlResources :
inferHtmlResources(BlackList, WhiteList)
inferHtmlResources(WhiteList, BlackList)
But here, since parameters are named, both overloaded versions are applicable, and the compiler can't decide which one to pick.
We'll drop the named parameters in the generated simulation.
When I use the blacklist in the recorder, the script wil contain the line:
.inferHtmlResources(black = BlackList(""".*\.css.*"""), white = WhiteList())
But the compiler in Eclipse (+ Scala IDE for Eclipse) complains:
ambiguous reference to overloaded definition, both method inferHtmlResources in class HttpProtocolBuilder of type (black: io.gatling.core.filter.BlackList, white: io.gatling.core.filter.WhiteList)io.gatling.http.config.HttpProtocolBuilder and method inferHtmlResources in class HttpProtocolBuilder of type (white: io.gatling.core.filter.WhiteList, black: io.gatling.core.filter.BlackList)io.gatling.http.config.HttpProtocolBuilder match argument types (black: io.gatling.core.filter.BlackList,white: io.gatling.core.filter.WhiteList)
When I leave the parameter names out of the method call, the compiler can resolve the correct overload by type:
.inferHtmlResources(BlackList(""".*\.css.*"""), WhiteList())
See https://groups.google.com/forum/#!topic/gatling/c087ltWzdAM
The text was updated successfully, but these errors were encountered: