Objo.
Feedback Forum Docs Objo Studio
Feedback

Feature #438

Add user-defined conversion operators

Status
Fixed
Fixed in
v26.6.4
Source discussion
https://forum.objo.dev/d/367-missing-assignment-operator-in-operator-overloading
Last updated
2026-06-15

Public summary

Add inbound user-defined conversion operators for custom ObjoBasic types. A target class can declare Shared Function Operator_Convert(value As SourceType) As TargetType, allowing values such as Integer, Double, or String expressions to initialise, assign to, or pass into that target type when a matching conversion overload exists.

Example:

Class Int128
  Shared Function Operator_Convert(value As Integer) As Int128
    Return New Int128(value)
  End Function
End Class

Var value As Int128 = 55

This is conversion overloading, not assignment overloading. Assignment remains a normal type/storage operation after the compiler resolves a valid direct assignment or conversion.

Objo.

Build apps visually, deploy anywhere.

Feedback is a public read-only status mirror for Objo Studio.