Commit 6fa81cf
authored
Fix #21669
This part of code is from #20084
We should check `parents` is non-empty before calling `reduceLeft`.
I haven't been able to create a standalone test. To test locally:
`i21669.scala`
```scala
//> using dep "com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.5"
import sttp.tapir.*
import sttp.tapir.client.sttp.SttpClientInterpreter
@main def run =
lazy val pingGET = endpoint.get
.in("ping")
.out(stringBody)
SttpClientInterpreter()
.toRequest(pingGET, Some(uri"http://localhost:8080"))
```
```
> sbt publishLocal
> scala compile --server=false -S 3.6.0-RC1-bin-SNAPSHOT i21669.scala
-- [E008] Not Found Error: /dotty/i21669.scala:12:33 ------
12 | .toRequest(pingGET, Some(uri"http://localhost:8080"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|value uri is not a member of StringContext, but could be made available as an extension method.
|
|One of the following imports might fix the problem:
|
| import sttp.client3.UriContext
| import sttp.client3.quick.UriContext
| import sttp.model.Uri.UriContext
|
1 error found
Compilation failed
```
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
1965 | | - | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
1966 | 1971 | | |
1967 | 1972 | | |
1968 | 1973 | | |
| |||
0 commit comments