Soft Interfaces/Duck-typing doesnt work properly

Hello,

i want to share a (possible, i m not pretty sure if it is) a bug, which says:

“E(265): Static Duck-typing failed because of missing methods”

But based on: https://docs.elementscompiler.com/Concepts/DuckTyping/ it actually should work, because the Compiler should just look for records/classes whichimplements “ToString(Format: string):string” but it seems that he cant :hushed:

here the test-case:
Test.zip (1.3 MB)

–Shpend

I’m not seeing a ToString(format: String): String on int32:

1 Like

Oh yea, I See it now too :sweat_smile:

Thank you, it works everything as expected :slight_smile:

1 Like