You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
module Test: {
/* include (module type of Test_Types); */
[@genType]
let make: string => string; // Broken
[@genType.as "make3"]
let make2: string => string; // Broken
} = {
/* include Test_Types; */
let make = (_) => "test";
let make2 = (_) => "test";
};
[@genType]
let makeTest = Test.make; // Works - also a viable workaround for those looking
This is the corresponding generated code:
export const Test_make: (_1:string) => string = MyModuleBS.Test.Test; // Broken - should be MyModuleBS.Test.make
export const Test_make3: (_1:string) => string = MyModuleBS.Test.Test; // Broken - should be MyModuleBS.Test.make2
export const makeTest: (_1:string) => string = MyModuleBS.makeTest; // Works
// I'm not sure why this also gets generated, but this becomes broken if we rename one of the functions to "make3"
export const Test: { make3: (_1:string) => string; make: (_1:string) => string } = MyModuleBS.Test
// probably should be = { make3: MyModuleBS.Test.make2, make: MyModuleBS.Test.make };
If I throw in a module include statement such as in the pattern for de-duplicating repeated types between interfaces and implementation, another weird behavior surfaces.
module Test_Types = {
module TestSubModule = {
type t = {
content: string,
};
};
};
module Test: {
include (module type of Test_Types);
[@genType]
let make: string => string; // Broken
[@genType.as "make3"]
let make2: string => string; // Broken
} = {
include Test_Types;
let make = (_) => "test";
let make2 = (_) => "test";
};
Somehow "TestSubModule" works its way into the generated output despite never being used.
This is the corresponding generated code:
If I throw in a module include statement such as in the pattern for de-duplicating repeated types between interfaces and implementation, another weird behavior surfaces.
Somehow "TestSubModule" works its way into the generated output despite never being used.
The text was updated successfully, but these errors were encountered: