Skip to content

Commit 255a611

Browse files
author
James Brundage
committed
Updating Core Transpiler (Fixes #247)
1 parent ea5e4a6 commit 255a611

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Transpilers/Core/Pipescript.psx.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ process {
9191
@(
9292
# check each ScriptBlock attribute
9393
foreach ($attrAst in $ScriptBlock.Ast.ParamBlock.Attributes) {
94-
$attrRealType = $attrAst.TypeName.ToString() -as [type]
94+
95+
$attrRealType =
96+
if ($attrAst.TypeName.GetReflectionType) {
97+
$attrAst.TypeName.GetReflectionType()
98+
} elseif ($attrAst.TypeName.ToString) {
99+
$attrAst.TypeName.ToString() -as [type]
100+
}
101+
95102
if (-not $attrRealType) {
96103
$attrAst
97104
}

0 commit comments

Comments
 (0)