]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/ImportJavaConstructor.scl
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / ImportJavaConstructor.scl
1
2 @JavaType "org.simantics.scl.compiler.elaboration.expressions.Expression"
3 data Expression = 
4     @JavaType "org/simantics/scl/compiler/elaboration/expressions/EIntegerLiteral"
5     @FieldNames [value]
6     EIntegerLiteral String
7   | @JavaType "org.simantics.scl.compiler.elaboration.expressions.ERealLiteral"
8     @FieldNames [value]
9     ERealLiteral String
10
11 changeType :: Expression -> Expression
12 changeType (EIntegerLiteral value) = ERealLiteral value
13 changeType (ERealLiteral value) = EIntegerLiteral value
14
15 main :: Expression
16 main = changeType (EIntegerLiteral "123") 
17 --
18 123