nested module: import error-reporting issue
rjharmon opened this issue · 3 comments
rjharmon commented
compiling a Program that imports a module with this wrong syntax throws a generic "unexpected undefined value" error.
module Foo
struct DelegateDetails {
name: String
addrs: Address[]
}
Expected an error with src:
attribute pointing to the right file & error position - same as when the wrong syntax is in the spending script:
TypeError on line 5: 'Address' isn't a parametric instance
christianschmitz commented
v0.15.13 hopefully fixes this
rjharmon commented
Well, the error is different now : )
Sorry I didn't give a stack trace before - here's the current trace
TypeError: Cannot read properties of undefined (reading 'asDataType')
❯ DestructExpr.evalDestructExprs node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:32042:72
❯ checkType node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:32146:9
❯ DestructExpr.evalInAssignExpr node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:32157:4
❯ AssignExpr.evalInternal node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:29415:24
❯ AssignExpr.eval node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:28632:23
❯ FuncLiteralExpr.evalInternal node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:30575:32
❯ node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:34724:24
❯ TypeParameters.evalParametricFuncType node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:33527:16
❯ TypeParameters.evalParametricFunc node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:33544:21
❯ FuncStatement.evalInternal node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:34711:34
❯ FuncStatement.eval node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:34748:22
❯ Module.evalTypes node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:41772:6
❯ MintingProgram.evalTypesInternal node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:42281:6
❯ MintingProgram.evalTypesInternal node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:42966:26
❯ MintingProgram.evalTypes node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:43017:15
❯ Function.newInternal node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:42078:28
❯ Function.new node_modules/.pnpm/@hyperionbt+helios@0.15.13/node_modules/@hyperionbt/helios/helios.js:42038:18
(from Program.new(src, modules)
in my code)
rjharmon commented
looks good, thanks