GslCore
GslCore copied to clipboard
BUG: combining inline expansion and variable ref to .up or .down causes internal error
Using a variable reference with a qualification for a subpart e.g. &locus.up inside a function which also uses inline sequences causes the internal error shown below. GSL internally creates GSL it can't process
E.g. this GSL
#refgenome S288C
#platform stitch
#linkers 0,2,3,9|
let func(locus)=
&locus.up ; /$HI/ ; &locus.down
end
func(gYNG2)
emits this error with the compiler.
ParserError: near line 1 col 9
syntax error; found ';', expected one of ['>'].
=================================================================
#refgenome S288C
^
let func(locus)=
&locus.up ; /$HI/ ; &locus.down
end
func(gYNG2)
InternalError: near line 3 col 5
An error occurred while parsing this internally-generated GSL source code:
gYNG2.up;/CACATC/ ;gYNG2.down
=================================================================
#refgenome S288C
let func(locus)=
&locus.up ; /$HI/ ; &locus.down
^
end
func(gYNG2)
In contrast, this code
#refgenome S288C
#platform stitch
#linkers 0,2,3,9|
let func(locus)=
&locus.up ; /$HI/ ; &locus.down
end
func(gYNG2)
compiles without issue. I think it's related to the order of expansion but I don't see why processing &locus.up later should make any difference.