File:  [parser3project] / parser3 / tests / 360.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Tue Oct 11 23:35:13 2016 UTC (9 years, 10 months ago) by moko
Branches: MAIN
CVS tags: release_3_4_6, release_3_4_5, HEAD
more test code (related to feature #1104)

@main[]
$n(1)

code junctions ignore in expression flag, this it works:
$x(^if(2){^n.int[]^n.int[]})
$x

this code will work if OPTIMIZE_CALL is undefined after OP_PREPARE_TO_EXPRESSION removed (#1104):
^try-catch{ $y(^test[]) }
$y

this code does not work in 3.4.4:
^try-catch{ $z(^test-wrapper[]) }
$z

string and value: $s(^test-string[]) $s $s.CLASS_NAME
string and object: $s[^test-object[]] $s.CLASS_NAME

#test is in expression + CO_WITHOUT_WCONTEXT is on by default, thus exception
@test[]
^n.int[]^n.int[]

#wrapper hides in expression flag, thus no more exception after OP_PREPARE_TO_EXPRESSION removed
@test-wrapper[]
^test[]

@test-string[]
string value (even non-whitespace!) is ignored if value (^n.int[]) is returned.

@test-object[]
same thing in string context if object (^hash::create[]) is returned.

E-mail: