# Internal Error of the Oxygene Compiler

**URL:** https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748
**Category:** Oxygene
**Created:** [August 25, 2015, 4:09pm UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748 "2015-08-25T16:09:01Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![josefstadelman](https://talk.remobjects.com/user_avatar/talk.remobjects.com/josefstadelman/32/40_2.png) [@josefstadelman](https://talk.remobjects.com/u/josefstadelman)
#### Post date: [August 25, 2015, 4:09pm UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/1 "2015-08-25T16:09:02Z")

</div>

Why do we get that error ?

 ![](https://talk.remobjects.com/uploads/default/original/2X/9/9972cd7c5246f45e0938d53c34e2ed63cac16a6b.png)

[DynamicOxygeneInternalError.zip](https://talk.remobjects.com/uploads/default/original/2X/6/601dfa586f4e9af8e8676761d43099ccd8140461.zip) (208.3 KB)

Any more questions will be gladly taken and forwarded to our specialists.  
Regards  
Josef

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [August 25, 2015, 4:19pm UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/2 "2015-08-25T16:19:16Z")

</div>

Thanks, logged as bugs://72855

---

<div class="post-metadata">

### Author: ![josefstadelman](https://talk.remobjects.com/user_avatar/talk.remobjects.com/josefstadelman/32/40_2.png) [@josefstadelman](https://talk.remobjects.com/u/josefstadelman)
#### Post date: [August 26, 2015, 6:22am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/3 "2015-08-26T06:22:31Z")

</div>

The work in total aims at overcoming the E207 compilation error in order to keep/maintain our application code, passing parameters and properties of complex types, possible in OpenVMS, but working total different calling into procedures and functions written in Oxygene and other .NET languages, where only simple types and local fields are accepted. So far E207. To overcome circumstances alone would require us to rewrite big portions of our application code.

important to know about what we delivered is!  
the code passed in the zip has a C# demonstrator which shows that our code when called from C# works perfect but fails with the said compilation error when we attempt to call our code from an Oxygene demonstrator from our application held in Pascal.

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [August 26, 2015, 6:48am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/4 "2015-08-26T06:48:38Z")

</div>

Oke so Oxygene currently shows an exception there (and it shouldn’t), but what does that have to do with E207?

As a temporary workaround, use:

```oxygene
OxygeneTools.Substitute(testStructure.Var.TestString1, "not");

```

that will give the right result.

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [August 26, 2015, 7:03am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/5 "2015-08-26T07:03:39Z")

</div>

bugs://72855 got closed with status fixed.

---

<div class="post-metadata">

### Author: ![josefstadelman](https://talk.remobjects.com/user_avatar/talk.remobjects.com/josefstadelman/32/40_2.png) [@josefstadelman](https://talk.remobjects.com/u/josefstadelman)
#### Post date: [August 26, 2015, 7:15am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/6 "2015-08-26T07:15:11Z")

</div>

Thanks for the prompt work.  
Are you saying that this is really a temporary workaround and that a fix will be provided with the next bug fix release of Oxygene? **We tested your workaround and it works in fact in our code**. But, because a call to Substitute is used at so many places in our application code, often nested, that is a big work to change all this places.  
Josef

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [August 26, 2015, 7:17am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/7 "2015-08-26T07:17:13Z")

</div>

This will be fixed in the next beta and the release following it yes. But if you need it very soon, the workaround is probably the simplest option.

---

<div class="post-metadata">

### Author: ![FredyFerrari](https://talk.remobjects.com/user_avatar/talk.remobjects.com/fredyferrari/32/2038_2.png) [@FredyFerrari](https://talk.remobjects.com/u/FredyFerrari)
#### Post date: [August 26, 2015, 7:20am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/8 "2015-08-26T07:20:14Z")

</div>

The problem which josefstadelman tried to explain has the following origin:

We have a bunch of code of business logic which originaly comes from VAX/VMS Pascal and this code is written and maintained by other people and this collegues “think” in original Pascal logic.

We have to provide the tools and classes to make the old code run under the new hood.

Now, one problem is that properties cannot be passed as var parameters (and this is the error josefstadelman is refering to). We wrote this PropertyWrapper as a workaround to allow the old code pass the properties to the old tools.

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [August 26, 2015, 7:34am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/9 "2015-08-26T07:34:23Z")

</div>

Ah yes. There is a trick you could do in the next beta, which is using the ‘autoclosure’ attribute. This is a special attribute we introduced for Silver, but works for Oxygene/Hydrogene too, something like:

```auto
method Test([autoclosure]r: System.Linq.Expressions.Expression<Func<Integer>>); empty;

  test(m.n);

```

The other side then gets an Expression tree,although your dynamic code might be a little more performant. That said the next beta will support both properly.

---

<div class="post-metadata">

### Author: ![FredyFerrari](https://talk.remobjects.com/user_avatar/talk.remobjects.com/fredyferrari/32/2038_2.png) [@FredyFerrari](https://talk.remobjects.com/u/FredyFerrari)
#### Post date: [August 26, 2015, 7:49am UTC](https://talk.remobjects.com/t/internal-error-of-the-oxygene-compiler/6748/10 "2015-08-26T07:49:46Z")

</div>

Cool. Thank you.

Performance is not such an issue here. I already have lots of linq code and my real SpezplaStructure is heavely using Reflection to make the class work as close as possible to the original VAX/VMS code.

So your trick will perfectly fit in our solution 😉
