File tree Expand file tree Collapse file tree
crates/bindings-csharp/Codegen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,9 +215,9 @@ string typeName
215215 public static readonly ErrorDescriptor < MethodDeclarationSyntax > ViewInvalidReturn =
216216 new (
217217 group ,
218- "Views must return Vec <T> or Option<T> " ,
219- method => $ "View '{ method . Identifier } ' must return Vec <T> or Option<T> .",
220- method => method
218+ "Views must return List <T> or T? " ,
219+ method => $ "View '{ method . Identifier } ' must return List <T> or T? .",
220+ method => method . ReturnType
221221 ) ;
222222
223223 // TODO: Remove once Views support Private: Views must be Public currently
Original file line number Diff line number Diff line change @@ -1189,7 +1189,7 @@ method.ReturnType is INamedTypeSymbol
11891189 ? "SpacetimeDB.BSATN.ValueOption"
11901190 : "SpacetimeDB.BSATN.RefOption" ;
11911191 var opt = $ "{ optType } <{ rowType . Name } , { rowType . BSATNName } >";
1192- // Match Rust semantics: Query<T> is described as Option<T> .
1192+ // Match Rust semantics: Query<T> is described as a nullable row (T?) .
11931193 ReturnType = new ReferenceUse ( opt , opt ) ;
11941194 }
11951195 else
@@ -1210,7 +1210,7 @@ method.ReturnType is INamedTypeSymbol
12101210 diag . Report ( ErrorDescriptor . ViewContextParam , methodSyntax ) ;
12111211 }
12121212
1213- // Validate return type: must be Option <T> or Vec<T>
1213+ // Validate return type: must be List <T> or T?
12141214 if (
12151215 ! ReturnType . BSATNName . Contains ( "SpacetimeDB.BSATN.ValueOption" )
12161216 && ! ReturnType . BSATNName . Contains ( "SpacetimeDB.BSATN.RefOption" )
You can’t perform that action at this time.
0 commit comments