Skip to content

Commit

Permalink
Remove # when printing boxed types (#10881)
Browse files Browse the repository at this point in the history
- Type.toString is mostly just used for error messages, and boxed types
  are an implementation detail that we shouldn't leak to users.
  • Loading branch information
perost committed Jun 22, 2023
1 parent 424efd2 commit a7343ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFType.mo
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ public
case Type.UNKNOWN() then "unknown()";
case Type.COMPLEX() then AbsynUtil.pathString(InstNode.scopePath(ty.cls));
case Type.FUNCTION() then Function.typeString(ty.fn);
case Type.METABOXED() then "#" + toString(ty.ty);
case Type.METABOXED() then toString(ty.ty);
case Type.POLYMORPHIC()
then if Util.stringStartsWith("__", ty.name) then
substring(ty.name, 3, stringLength(ty.name)) else "<" + ty.name + ">";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end FunctionalArgInvalidType1;
// [flattening/modelica/scodeinst/FunctionalArgInvalidType1.mo:26:3-26:21:writable] Error: Type mismatch for positional argument 1 in f1(f=f2). The argument has type:
// f2<function>(Integer) => Integer
// expected type:
// f<function>(#Real) => #Real
// f<function>(Real) => Real
//
// # Error encountered! Exiting...
// # Please check the error message and the flags.
Expand Down

0 comments on commit a7343ac

Please sign in to comment.