Skip to content

Method doesn't understand result return #28015

Description

@einar-hjortdal

Describe the bug

In this function I am getting these compiler errors

providers.v:151:3: error: `errors.PeonyError` doesn't implement method `create` of interface `providers.BlobProvider`
  149 | fn (mut app App) get_blob_provider_instance() !&providers.BlobProvider {
  150 |     mut entry := app.providers.blob or {
  151 |         return errors.internal('No blob provider is installed', 'app.providers.blob is none')
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  152 |     }
  153 |
providers.v:151:3: error: `errors.PeonyError` doesn't implement method `delete` of interface `providers.BlobProvider`
  149 | fn (mut app App) get_blob_provider_instance() !&providers.BlobProvider {
  150 |     mut entry := app.providers.blob or {
  151 |         return errors.internal('No blob provider is installed', 'app.providers.blob is none')
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  152 |     }
  153 |
providers.v:156:4: error: `errors.PeonyError` doesn't implement method `create` of interface `providers.BlobProvider`
  154 |     instance := entry.instance or {
  155 |         new_instance := entry.factory() or {
  156 |             return errors.internal('Failed to get new blob provider instance', err.msg())
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  157 |         }
  158 |         return new_instance
providers.v:156:4: error: `errors.PeonyError` doesn't implement method `delete` of interface `providers.BlobProvider`
  154 |     instance := entry.instance or {
  155 |         new_instance := entry.factory() or {
  156 |             return errors.internal('Failed to get new blob provider instance', err.msg())
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  157 |         }
  158 |         return new_instance

errors.PeonyError implements IError, but this function thinks I am returning providers.BlobProvider instead.

Reproduction Steps

git clone https://github.com/einar-hjortdal/peony.git
cd peony
git checkout c352965f3b2b446ab0b25444792b6aaccf72237d
v install
v run tests/peony_test.v 

Expected Behavior

Other errors, not this one.

Current Behavior

error: errors.PeonyError doesn't implement method delete of interface providers.BlobProvider

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.5.2 667fbb9

Environment details (OS name and version, etc.)

V full version V 0.5.2 58f1857.667fbb9
OS linux, "openmamba release 2026.7 for x86_64 (rolling)"
Processor 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Memory 3.47GB/31.17GB
V executable /home/einar/.local/lib64/v/v
V last modified time 2026-08-03 08:35:56
V home dir OK, value: /home/einar/.local/lib64/v
VMODULES OK, value: /home/einar/.vmodules
VTMP OK, value: /tmp/v_1000
Current working dir OK, value: /home/einar/Documents/projects/vlang/active/peony
Git version git version 2.55.0
V git status weekly.2026.03-2776-g667fbb9e
.git/config present true
cc version cc (GCC) 16.1.0
gcc version gcc (GCC) 16.1.0
clang version N/A
tcc version tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux)
tcc git status thirdparty-linux-amd64 696c1d84
emcc version N/A
glibc version ldd (GNU libc) 2.44

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis tag is applied to issues which reports bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions