wyvernlang/wyvern

Types aren't handled properly in arrow types

Closed this issue · 0 comments

In the text-editor application, in the textEditor module, make the type of the last module parameter more precise by substituting the Dyn type with the arrow type Unit -> TextEditor, i.e., change the textEditor module header, which is currently:

module def textEditor(java: Java, logger: Logger, createTextEditorInstance: Dyn): TextEditor

to be:

module def textEditor(java: Java, logger: Logger, createTextEditorInstance: Unit -> TextEditor): TextEditor

Run the text-editor application.

Expected behavior: No error is thrown.

Actual behavior: The following error is thrown:

Type TextEditor is not defined at location file wyvern/examples/text-editor/textEditor.wyv on line 1 column 85

It's unclear whether this is the problem for all arrow types, but, at least, it manifests in module parameters.