Skip to content

Commit

Permalink
feat(*): handles type concerto.scalar.UUID
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Casey <[email protected]>
  • Loading branch information
jonathan-casey committed Nov 24, 2023
1 parent 0549545 commit f69d1d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/codegen/fromcto/csharp/csharpvisitor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unreachable */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -327,7 +328,8 @@ class CSharpVisitor {
}
else if (ModelUtil.isScalar(mapDeclaration.getKey())) {
const scalarDeclaration = mapDeclaration.getModelFile().getType(mapDeclaration.getKey().getType());
const scalarType = scalarDeclaration.getType();
const keyFQN = ModelUtil.removeNamespaceVersionFromFullyQualifiedName(scalarDeclaration.getFullyQualifiedName());
const scalarType = keyFQN === 'concerto.scalar.UUID' ? keyFQN : scalarDeclaration.getType();
keyType = this.toCSharpType(scalarType);
}

Expand All @@ -337,7 +339,8 @@ class CSharpVisitor {
}
else if (ModelUtil.isScalar(mapDeclaration.getValue())) {
const scalarDeclaration = mapDeclaration.getModelFile().getType(mapDeclaration.getValue().getType());
const scalarType = scalarDeclaration.getType();
const keyFQN = ModelUtil.removeNamespaceVersionFromFullyQualifiedName(scalarDeclaration.getFullyQualifiedName());
const scalarType = keyFQN === 'concerto.scalar.UUID' ? keyFQN : scalarDeclaration.getType();
valueType = this.toCSharpType(scalarType);
} else {
valueType = mapValueType;
Expand Down

0 comments on commit f69d1d0

Please sign in to comment.