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
Describe the bug
When building a bicep parameter file that is referring a compile-time imported UDF, the following compilation error is thrown: Failed to evaluate parameter "paramname": The template function '_1.getValue' is not expected at this location.
To Reproduce
I've included a project as attachment to reproduce the situation.
build.ps1 --> main.bicepparam.bicep --> throws the error
UDFs aren't supported in bicepparam files at the moment. While the compiler blocks function and type imports via the cherry-pick syntax (import { aType, aFunction } from 'mod.bicep'), there's no similar block when using wildcard imports.
We could add a linter to check the use of wildcard import properties and raise a diagnostic when a function is dereferenced. This would at least provide an opportunity to surface a more helpful error message than the Failed to evaluate... message currently being encountered. This could also be addressed by adding support for UDFs in the bicepparam compiler.
Bicep version
Bicep CLI version 0.24.24 (5646341)
Describe the bug
When building a bicep parameter file that is referring a compile-time imported UDF, the following compilation error is thrown:
Failed to evaluate parameter "paramname": The template function '_1.getValue' is not expected at this location.
To Reproduce
I've included a project as attachment to reproduce the situation.
build.ps1 --> main.bicepparam.bicep --> throws the error
Additional context
See attachment:
bicep-udt-compiletimeimport-bicepparam-notexpected.zip
The text was updated successfully, but these errors were encountered: