# \`Void\` and \`()\` cannot be used

**URL:** https://talk.remobjects.com/t/void-and-cannot-be-used/20864
**Category:** Elements Bugs
**Created:** [December 4, 2019, 3:21pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864 "2019-12-04T15:21:24Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![dbroggi](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dbroggi](https://talk.remobjects.com/u/dbroggi)
#### Post date: [December 4, 2019, 3:21pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/1 "2019-12-04T15:21:24Z")

</div>

**IDE:** _Visual Studio X/Fire_  
**Version:** _10.0.0.2459 (develop)_  
**Target** (If relevant): _Island(OSX)_  
**Description** :  
The compiler emits various errors for use of `Void` and `()` that are incorrect.  
Although all of these cases are trivial, the compiler shouldn’t forbid them.

**Expected Behavior** :  
Compiles.  
**Actual Behavior** :  
See below.  
**Steps** :

```auto
let x: () = () // E62 Type mismatch, cannot assign "<tuple literal>" to "Void"

let y: Void = () // E503 Tuples require .NET v4.0

let z = () // E503 Tuples require .NET v4.0

let w: () // E96 Internal type "Void" cannot be used directly

func foo(x: () ) { // E96 Internal type "Void" cannot be used directly
    
}

foo(x: ()) // E503 Tuples require .NET v4.0

func bar(x: Void ) {
    
}

bar(x: ()) // E503 Tuples require .NET v4.0

```

---

<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: [December 4, 2019, 3:24pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/2 "2019-12-04T15:24:33Z")

</div>

Thanks, logged as [bugs://83611](https://www.remobjects.com/portal/bugs/?id=83611)

---

<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: [December 5, 2019, 6:59am UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/3 "2019-12-05T06:59:25Z")

</div>

[bugs://83611](https://www.remobjects.com/portal/bugs/?id=83611) got closed with status fixed.

---

<div class="post-metadata">

### Author: ![dbroggi](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dbroggi](https://talk.remobjects.com/u/dbroggi)
#### Post date: [December 9, 2019, 1:17am UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/4 "2019-12-09T01:17:27Z")

</div>

This case is still not working on _10.0.0.2461 (develop)_, FYI.

```auto
func foo(x: () ) {} // E96 Internal type "Void" cannot be used directly 

```

---

<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: [December 9, 2019, 5:20am UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/5 "2019-12-09T05:20:42Z")

</div>

ah yes. Fixed.

---

<div class="post-metadata">

### Author: ![dbroggi](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dbroggi](https://talk.remobjects.com/u/dbroggi)
#### Post date: [December 21, 2019, 6:15pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/6 "2019-12-21T18:15:37Z")

</div>

Another, somewhat silly, `Void` problem in _10.0.0.2465 (develop)_:

```auto
var v: Void {
	return // E467 Cannot return without a value
}

```

Found in a test verifying properties had the correct name when translated to LLVM.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 22, 2019, 3:49pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/7 "2019-12-22T15:49:57Z")

</div>

> [@dbroggi](#):
>
> Another, somewhat silly, `Void` problem in _10.0.0.2465 (develop)_ :
> 
> ```auto
> var v: Void {
> return // E467 Cannot return without a value
> }
> 
> ```
> 
> Found in a test verifying properties had the correct name when translated to LLVM.

Odd. Will log.

---

<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: [December 22, 2019, 3:50pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/8 "2019-12-22T15:50:01Z")

</div>

Thanks, logged as [bugs://83689](https://www.remobjects.com/portal/bugs/?id=83689)

---

<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: [January 8, 2020, 10:42am UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/9 "2020-01-08T10:42:43Z")

</div>

[bugs://83689](https://www.remobjects.com/portal/bugs/?id=83689) got closed with status fixed.

---

<div class="post-metadata">

### Author: ![dbroggi](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dbroggi](https://talk.remobjects.com/u/dbroggi)
#### Post date: [January 11, 2020, 3:16pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/10 "2020-01-11T15:16:48Z")

</div>

This last thing was, unfortunately, not actually fixed in _10.0.0.2471 (develop)_.  
It just changed the error. It now outputs:

```auto
var v: Void {
	return // E524 Method reaches end without returning a value
}

```

---

<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: [January 11, 2020, 3:38pm UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/11 "2020-01-11T15:38:17Z")

</div>

[bugs://83689](https://www.remobjects.com/portal/bugs/?id=83689) got reopened.

---

<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: [January 13, 2020, 8:00am UTC](https://talk.remobjects.com/t/void-and-cannot-be-used/20864/12 "2020-01-13T08:00:22Z")

</div>

[bugs://83689](https://www.remobjects.com/portal/bugs/?id=83689) got closed with status fixed.
