OutputType attribute should detect output type error on strict mode - by S.K. _

Status : 

 


3
0
Sign in
to vote
ID 801907 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 9/22/2013 11:01:34 PM
Access Restriction Public

Description

Currently, outputtype attribute doesn't influence function's output-values.

But I expect it detect unexpected type error when a function outputs unexpected types --- in strict mode at least.


Set-StrictMode -Version 3

function aaa {
[OutputType([int])]
"String"
}

aaa
# unexpected type error
Sign in to post a comment.