mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-03 18:10:56 +01:00
remove redundant "union behavior"
This commit is contained in:
parent
f5c5609d77
commit
b995140a1e
1 changed files with 0 additions and 4 deletions
|
@ -42,10 +42,6 @@ test(1, "string") -- Type error: Expected `number`, got `string`
|
|||
- If a different type is encountered, a **type error** is raised.
|
||||
- `T` will not expand into a union.
|
||||
|
||||
2. **Behaviour in Unions**
|
||||
- A function or type with `T!` cannot instantiate `T` with a union.
|
||||
- If `T` is already a union, it must remain a union as new types cannot be added to it.
|
||||
|
||||
## Drawbacks
|
||||
|
||||
- Introduces a new syntax modifier (`T!`), which may lead to a symbol soup, but it doesn't seem too shabby next to `T?`.
|
||||
|
|
Loading…
Add table
Reference in a new issue