Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: allow "id" to be name of argument to functions (#6912)
I think this restriction got added along with restrictions around using it for field/function names, but it was overzealous; can't see any reason why it can't be an arg name. Signed-off-by: Erik Sipsma <erik@dagger.io>
- Loading branch information
Showing
5 changed files
with
17 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ package main | |
type Test struct{} | ||
|
||
func (m *Test) Fn(id string) string { | ||
return "NOOOO!!!!" | ||
return id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
@function | ||
def fn(id: str) -> str: | ||
return "NOOOO!!!!" | ||
return id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { object, func } from "@dagger.io/dagger" | ||
import { object, func } from "@dagger.io/dagger"; | ||
|
||
@object() | ||
class Test { | ||
@func() | ||
fn(id: string): string { | ||
return "NOOOO!!!!" | ||
} | ||
return id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters