Skip to content

Commit

Permalink
Generate aliased Map classdefs in MATLAB codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
naegelejd committed Dec 12, 2024
1 parent 02bf292 commit c571a1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions matlab/generated/+basic_types/AliasedMap.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% This file was generated by the "yardl" tool. DO NOT EDIT.

classdef AliasedMap < yardl.Map
end
4 changes: 4 additions & 0 deletions matlab/generated/+test_model/AliasedMap.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% This file was generated by the "yardl" tool. DO NOT EDIT.

classdef AliasedMap < basic_types.AliasedMap
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
function self = RecordContainingVectorsOfAliases(kwargs)
arguments
kwargs.strings = string.empty();
kwargs.maps = yardl.Map.empty();
kwargs.maps = test_model.AliasedMap.empty();
kwargs.arrays = single.empty();
kwargs.tuples = test_model.MyTuple.empty();
end
Expand Down
2 changes: 1 addition & 1 deletion tooling/internal/matlab/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func typeCanBeAliased(t dsl.Type) bool {
}
} else if gt, ok := t.(*dsl.GeneralizedType); ok {
switch gt.Dimensionality.(type) {
case *dsl.Vector, *dsl.Array, *dsl.Map:
case *dsl.Vector, *dsl.Array:
return false
}
}
Expand Down

0 comments on commit c571a1e

Please sign in to comment.