v
v copied to clipboard
Build error: tcc: error: undefined symbol 'color__Color_cprintln', tcc: error: undefined symbol 'color__Brush_cprintln'
Describe the bug
Compile error (C error)
Expected Behavior
For it to compile
Current Behavior
C error (undefined function)
Reproduction Steps
Run v run test.v
Possible Solution
No response
Additional Information/Context
File: https://github.com/RGBCube/v-color/blob/a8949500a3135be39894c813d39201a4df3262b7/test.v @ https://github.com/RGBCube/v-color/commit/a8949500a3135be39894c813d39201a4df3262b7
V version
latest: Current V version: V 0.3.2 0e727ec, timestamp: 2022-11-20 16:44:58 +0200
Environment details (OS name and version, etc.)
Arch Linux x86_64, host: A4321A6421-H110 0601, kernel: 6.0.8-arch1-1, shell:bash 5.1.16,
I was able to bring it down to this:
interface IFoo { foo() }
struct Foo {}
fn (f Foo) foo()
Changing to
fn (f Foo) foo() {}
fixes it.
What was the real reproducible case?
Oh, the real case is https://GitHub.com/RGBCube/color.v, the Brush interface
I was able to narrow it down to this
struct Foo {
bar int
}
interface Bar {
bar int
}
fn (b Bar) print() {
print(b.bar)
}
interface Baz {
Bar
}
fn (bz Baz) println() {
bz.print()
println("")
}
Any updates on this? I've provided a reproducible example above