mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 18:34:03 +03:00
Send conversion method suggestions (#7857)
close #7320
Changelog:
- update: enable conversion suggestions
- fix: conversion suggestion building
- fix: conversion suggestion types
- fix: conversion JSON-RPC representation
# Important Notes
For example, the [`Day_Of_Week_From`](5150c14afd/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Time/Day_Of_Week_From.enso
) conversion is sent as
```json
{
"type":"Add",
"id":32,
"suggestion":{
"type":"method",
"module":"Standard.Base.Data.Time.Day_Of_Week_From",
"name":"from",
"arguments":[
{
"name":"that",
"reprType":"Standard.Base.Data.Numbers.Integer",
"isSuspended":false,
"hasDefault":false,
"defaultValue":null,
"tagValues":null
},
{
"name":"first_day",
"reprType":"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week",
"isSuspended":false,
"hasDefault":true,
"defaultValue":"Day_Of_Week.Sunday",
"tagValues":[
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Sunday",
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Monday",
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Tuesday",
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Wednesday",
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Thursday",
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Friday",
"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week.Saturday"
]
},
{
"name":"start_at_zero",
"reprType":"Standard.Base.Data.Boolean.Boolean",
"isSuspended":false,
"hasDefault":true,
"defaultValue":"False",
"tagValues":[
"Standard.Base.Data.Boolean.Boolean.True",
"Standard.Base.Data.Boolean.Boolean.False"
]
}
],
"selfType":"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week",
"returnType":"Standard.Base.Data.Time.Day_Of_Week.Day_Of_Week",
"isStatic":false,
"documentation":" Convert from an integer to a Day_Of_Week\n\nArguments:\n- `that`: The first day of the week.\n- `first_day`: The first day of the week.\n- `start_at_zero`: If True, first day of the week is 0 otherwise is 1.",
"annotations":[
]
}
}
```
This commit is contained in:
parent
b0a5ac2c19
commit
c88765d259
@ -126,19 +126,12 @@ object SearchProtocol {
|
|||||||
|
|
||||||
private def conversionToMethod(
|
private def conversionToMethod(
|
||||||
conversion: Suggestion.Conversion
|
conversion: Suggestion.Conversion
|
||||||
): Suggestion.DefinedMethod = {
|
): Suggestion.DefinedMethod =
|
||||||
val arg = Suggestion.Argument(
|
|
||||||
Suggestion.Kind.Conversion.From,
|
|
||||||
conversion.selfType,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
None
|
|
||||||
)
|
|
||||||
Suggestion.DefinedMethod(
|
Suggestion.DefinedMethod(
|
||||||
conversion.externalId,
|
conversion.externalId,
|
||||||
conversion.module,
|
conversion.module,
|
||||||
conversion.name,
|
conversion.name,
|
||||||
arg +: conversion.arguments,
|
conversion.arguments,
|
||||||
conversion.returnType,
|
conversion.returnType,
|
||||||
conversion.returnType,
|
conversion.returnType,
|
||||||
conversion.isStatic,
|
conversion.isStatic,
|
||||||
@ -146,7 +139,6 @@ object SearchProtocol {
|
|||||||
conversion.annotations,
|
conversion.annotations,
|
||||||
conversion.reexport
|
conversion.reexport
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
private def getterToMethod(
|
private def getterToMethod(
|
||||||
getter: Suggestion.Getter
|
getter: Suggestion.Getter
|
||||||
|
@ -159,21 +159,24 @@ final class SuggestionBuilder[A: IndexedSource](
|
|||||||
|
|
||||||
case definition.Method
|
case definition.Method
|
||||||
.Conversion(
|
.Conversion(
|
||||||
Name.MethodReference(_, _, _, _, _),
|
Name.MethodReference(typePtr, _, _, _, _),
|
||||||
Name.Literal(sourceTypeName, _, _, _, _),
|
_,
|
||||||
Function.Lambda(args, body, _, _, _, _),
|
Function.Lambda(args, body, _, _, _, _),
|
||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_
|
_
|
||||||
) if ConversionsEnabled =>
|
) =>
|
||||||
val typeSignature = ir.getMetadata(TypeSignatures)
|
val selfType = typePtr.flatMap { typePointer =>
|
||||||
|
typePointer
|
||||||
|
.getMetadata(MethodDefinitions)
|
||||||
|
.map(_.target.qualifiedName)
|
||||||
|
}
|
||||||
val conversion = buildConversion(
|
val conversion = buildConversion(
|
||||||
body.getExternalId,
|
body.getExternalId,
|
||||||
module,
|
module,
|
||||||
|
selfType,
|
||||||
args,
|
args,
|
||||||
sourceTypeName,
|
doc
|
||||||
doc,
|
|
||||||
typeSignature
|
|
||||||
)
|
)
|
||||||
go(tree += Tree.Node(conversion, Vector()), scope)
|
go(tree += Tree.Node(conversion, Vector()), scope)
|
||||||
|
|
||||||
@ -286,20 +289,25 @@ final class SuggestionBuilder[A: IndexedSource](
|
|||||||
private def buildConversion(
|
private def buildConversion(
|
||||||
externalId: Option[IR.ExternalId],
|
externalId: Option[IR.ExternalId],
|
||||||
module: QualifiedName,
|
module: QualifiedName,
|
||||||
|
selfType: Option[QualifiedName],
|
||||||
args: Seq[DefinitionArgument],
|
args: Seq[DefinitionArgument],
|
||||||
sourceTypeName: String,
|
doc: Option[String]
|
||||||
doc: Option[String],
|
|
||||||
typeSignature: Option[TypeSignatures.Metadata]
|
|
||||||
): Suggestion.Conversion = {
|
): Suggestion.Conversion = {
|
||||||
val typeSig = buildTypeSignatureFromMetadata(typeSignature)
|
val methodArgs =
|
||||||
val (methodArgs, returnTypeDef) =
|
args.map { arg =>
|
||||||
buildFunctionArguments(args, typeSig)
|
buildTypeSignatureFromMetadata(
|
||||||
|
arg.getMetadata(TypeSignatures)
|
||||||
|
).headOption
|
||||||
|
.map(buildTypedArgument(arg, _))
|
||||||
|
.getOrElse(buildArgument(arg))
|
||||||
|
}.tail
|
||||||
|
|
||||||
Suggestion.Conversion(
|
Suggestion.Conversion(
|
||||||
externalId = externalId,
|
externalId = externalId,
|
||||||
module = module.toString,
|
module = module.toString,
|
||||||
arguments = methodArgs,
|
arguments = methodArgs,
|
||||||
selfType = sourceTypeName,
|
selfType = methodArgs.head.reprType,
|
||||||
returnType = buildReturnType(returnTypeDef),
|
returnType = selfType.fold(Any)(_.toString),
|
||||||
documentation = doc
|
documentation = doc
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -725,7 +733,9 @@ final class SuggestionBuilder[A: IndexedSource](
|
|||||||
expr match {
|
expr match {
|
||||||
case Literal.Number(_, value, _, _, _) => Some(value)
|
case Literal.Number(_, value, _, _, _) => Some(value)
|
||||||
case Literal.Text(text, _, _, _) => Some(text)
|
case Literal.Text(text, _, _, _) => Some(text)
|
||||||
case _ => None
|
case Application.Prefix(name, path, _, _, _, _) =>
|
||||||
|
Some(path.map(_.value.showCode()).mkString(".") + "." + name.showCode())
|
||||||
|
case other => Some(other.showCode())
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Build scope from the location. */
|
/** Build scope from the location. */
|
||||||
@ -745,9 +755,6 @@ final class SuggestionBuilder[A: IndexedSource](
|
|||||||
|
|
||||||
object SuggestionBuilder {
|
object SuggestionBuilder {
|
||||||
|
|
||||||
/** TODO[DB] enable conversions when they get the runtime support. */
|
|
||||||
private val ConversionsEnabled: Boolean = false
|
|
||||||
|
|
||||||
/** Creates the suggestion builder for a module.
|
/** Creates the suggestion builder for a module.
|
||||||
*
|
*
|
||||||
* @param module the module to index
|
* @param module the module to index
|
||||||
|
@ -857,14 +857,14 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
"build conversion method for simple type" in {
|
"build conversion method for simple type" in {
|
||||||
pending
|
|
||||||
|
|
||||||
val code =
|
val code =
|
||||||
"""type MyAtom a
|
"""import Standard.Base.Data.Numbers
|
||||||
|
|
|
||||||
|
|type Foo
|
||||||
|
| Value foo
|
||||||
|
|
|
|
||||||
|## My conversion
|
|## My conversion
|
||||||
|MyAtom.from : Number -> MyAtom
|
|Foo.from (that:Numbers.Number) = Foo.Value a
|
||||||
|MyAtom.from a = MyAtom a
|
|
||||||
|""".stripMargin
|
|""".stripMargin
|
||||||
val module = code.preprocessModule
|
val module = code.preprocessModule
|
||||||
|
|
||||||
@ -873,31 +873,42 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
ModuleNode,
|
ModuleNode,
|
||||||
Tree.Node(
|
Tree.Node(
|
||||||
Suggestion.Type(
|
Suggestion.Type(
|
||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
name = "MyType",
|
name = "Foo",
|
||||||
params = Seq(
|
params = Seq(),
|
||||||
Suggestion
|
returnType = "Unnamed.Test.Foo",
|
||||||
.Argument("a", SuggestionBuilder.Any, false, false, None)
|
|
||||||
),
|
|
||||||
returnType = "Unnamed.Test.MyType",
|
|
||||||
parentType = Some(SuggestionBuilder.Any),
|
parentType = Some(SuggestionBuilder.Any),
|
||||||
documentation = None
|
documentation = None
|
||||||
),
|
),
|
||||||
Vector()
|
Vector()
|
||||||
),
|
),
|
||||||
Tree.Node(
|
Tree.Node(
|
||||||
Suggestion.DefinedMethod(
|
Suggestion.Constructor(
|
||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
name = "a",
|
name = "Value",
|
||||||
|
arguments = Seq(
|
||||||
|
Suggestion
|
||||||
|
.Argument("foo", SuggestionBuilder.Any, false, false, None)
|
||||||
|
),
|
||||||
|
returnType = "Unnamed.Test.Foo",
|
||||||
|
documentation = None,
|
||||||
|
annotations = Seq()
|
||||||
|
),
|
||||||
|
Vector()
|
||||||
|
),
|
||||||
|
Tree.Node(
|
||||||
|
Suggestion.Getter(
|
||||||
|
externalId = None,
|
||||||
|
module = "Unnamed.Test",
|
||||||
|
name = "foo",
|
||||||
arguments = List(
|
arguments = List(
|
||||||
Suggestion
|
Suggestion
|
||||||
.Argument("self", "Unnamed.Test.MyType", false, false, None)
|
.Argument("self", "Unnamed.Test.Foo", false, false, None)
|
||||||
),
|
),
|
||||||
selfType = "Unnamed.Test.MyType",
|
selfType = "Unnamed.Test.Foo",
|
||||||
returnType = SuggestionBuilder.Any,
|
returnType = SuggestionBuilder.Any,
|
||||||
isStatic = false,
|
|
||||||
documentation = None,
|
documentation = None,
|
||||||
annotations = Seq()
|
annotations = Seq()
|
||||||
),
|
),
|
||||||
@ -908,10 +919,16 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
arguments = Seq(
|
arguments = Seq(
|
||||||
Suggestion.Argument("a", "Number", false, false, None)
|
Suggestion.Argument(
|
||||||
|
"that",
|
||||||
|
"Standard.Base.Data.Numbers.Number",
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
None
|
||||||
|
)
|
||||||
),
|
),
|
||||||
returnType = "Unnamed.Test.MyType",
|
selfType = "Standard.Base.Data.Numbers.Number",
|
||||||
selfType = "Number",
|
returnType = "Unnamed.Test.Foo",
|
||||||
documentation = Some(" My conversion")
|
documentation = Some(" My conversion")
|
||||||
),
|
),
|
||||||
Vector()
|
Vector()
|
||||||
@ -920,21 +937,14 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
"build conversion method for complex type" in {
|
"build conversion method with extra arguments" in {
|
||||||
pending
|
|
||||||
val code =
|
val code =
|
||||||
"""type MyMaybe
|
"""import Standard.Base.Data.Numbers
|
||||||
| Some a
|
|
||||||
| None
|
|
||||||
|
|
|
|
||||||
|type New
|
|type Foo
|
||||||
| Newtype x
|
| Value foo bar
|
||||||
|
|
|
|
||||||
|## My conversion method
|
|Foo.from (that:Numbers.Number) other=1 = Foo.Value that other
|
||||||
|New.from : MyMaybe -> New
|
|
||||||
|New.from opt = case opt of
|
|
||||||
| Some a -> Newtype a
|
|
||||||
| None -> Newtype 0
|
|
||||||
|""".stripMargin
|
|""".stripMargin
|
||||||
val module = code.preprocessModule
|
val module = code.preprocessModule
|
||||||
|
|
||||||
@ -945,9 +955,9 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
Suggestion.Type(
|
Suggestion.Type(
|
||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
name = "MyMaybe",
|
name = "Foo",
|
||||||
params = Seq(),
|
params = Seq(),
|
||||||
returnType = "Unnamed.Test.MyMaybe",
|
returnType = "Unnamed.Test.Foo",
|
||||||
parentType = Some(SuggestionBuilder.Any),
|
parentType = Some(SuggestionBuilder.Any),
|
||||||
documentation = None
|
documentation = None
|
||||||
),
|
),
|
||||||
@ -957,85 +967,46 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
Suggestion.Constructor(
|
Suggestion.Constructor(
|
||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
name = "Some",
|
name = "Value",
|
||||||
arguments = Seq(
|
arguments = Seq(
|
||||||
Suggestion
|
Suggestion
|
||||||
.Argument("a", SuggestionBuilder.Any, false, false, None)
|
.Argument("foo", SuggestionBuilder.Any, false, false, None),
|
||||||
|
Suggestion
|
||||||
|
.Argument("bar", SuggestionBuilder.Any, false, false, None)
|
||||||
),
|
),
|
||||||
returnType = "Unnamed.Test.MyMaybe",
|
returnType = "Unnamed.Test.Foo",
|
||||||
documentation = None,
|
documentation = None,
|
||||||
annotations = Seq()
|
annotations = Seq()
|
||||||
),
|
),
|
||||||
Vector()
|
Vector()
|
||||||
),
|
),
|
||||||
Tree.Node(
|
Tree.Node(
|
||||||
Suggestion.DefinedMethod(
|
Suggestion.Getter(
|
||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
name = "a",
|
name = "foo",
|
||||||
arguments = List(
|
arguments = List(
|
||||||
Suggestion
|
Suggestion
|
||||||
.Argument("self", "Unnamed.Test.MyMaybe", false, false, None)
|
.Argument("self", "Unnamed.Test.Foo", false, false, None)
|
||||||
),
|
),
|
||||||
selfType = "Unnamed.Test.MyMaybe",
|
selfType = "Unnamed.Test.Foo",
|
||||||
returnType = SuggestionBuilder.Any,
|
returnType = SuggestionBuilder.Any,
|
||||||
isStatic = false,
|
|
||||||
documentation = None,
|
documentation = None,
|
||||||
annotations = Seq()
|
annotations = Seq()
|
||||||
),
|
),
|
||||||
Vector()
|
Vector()
|
||||||
),
|
),
|
||||||
Tree.Node(
|
Tree.Node(
|
||||||
Suggestion.Constructor(
|
Suggestion.Getter(
|
||||||
externalId = None,
|
|
||||||
module = "Unnamed.Test",
|
|
||||||
name = "None",
|
|
||||||
arguments = Seq(),
|
|
||||||
returnType = "Unnamed.Test.None",
|
|
||||||
documentation = None,
|
|
||||||
annotations = Seq()
|
|
||||||
),
|
|
||||||
Vector()
|
|
||||||
),
|
|
||||||
Tree.Node(
|
|
||||||
Suggestion.Type(
|
|
||||||
externalId = None,
|
|
||||||
module = "Unnamed.Test",
|
|
||||||
name = "New",
|
|
||||||
params = Seq(),
|
|
||||||
returnType = "Unnamed.Test.New",
|
|
||||||
parentType = Some(SuggestionBuilder.Any),
|
|
||||||
documentation = None
|
|
||||||
),
|
|
||||||
Vector()
|
|
||||||
),
|
|
||||||
Tree.Node(
|
|
||||||
Suggestion.Constructor(
|
|
||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
name = "Newtype",
|
name = "bar",
|
||||||
arguments = Seq(
|
|
||||||
Suggestion
|
|
||||||
.Argument("x", SuggestionBuilder.Any, false, false, None)
|
|
||||||
),
|
|
||||||
returnType = "Unnamed.Test.New",
|
|
||||||
documentation = None,
|
|
||||||
annotations = Seq()
|
|
||||||
),
|
|
||||||
Vector()
|
|
||||||
),
|
|
||||||
Tree.Node(
|
|
||||||
Suggestion.DefinedMethod(
|
|
||||||
externalId = None,
|
|
||||||
module = "Unnamed.Test",
|
|
||||||
name = "x",
|
|
||||||
arguments = List(
|
arguments = List(
|
||||||
Suggestion
|
Suggestion
|
||||||
.Argument("self", "Unnamed.Test.New", false, false, None)
|
.Argument("self", "Unnamed.Test.Foo", false, false, None)
|
||||||
),
|
),
|
||||||
selfType = "Unnamed.Test.New",
|
selfType = "Unnamed.Test.Foo",
|
||||||
returnType = SuggestionBuilder.Any,
|
returnType = SuggestionBuilder.Any,
|
||||||
isStatic = false,
|
|
||||||
documentation = None,
|
documentation = None,
|
||||||
annotations = Seq()
|
annotations = Seq()
|
||||||
),
|
),
|
||||||
@ -1046,12 +1017,138 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
|
|||||||
externalId = None,
|
externalId = None,
|
||||||
module = "Unnamed.Test",
|
module = "Unnamed.Test",
|
||||||
arguments = Seq(
|
arguments = Seq(
|
||||||
|
Suggestion.Argument(
|
||||||
|
"that",
|
||||||
|
"Standard.Base.Data.Numbers.Number",
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
None
|
||||||
|
),
|
||||||
Suggestion
|
Suggestion
|
||||||
.Argument("opt", "Unnamed.Test.MyMaybe", false, false, None)
|
.Argument(
|
||||||
|
"other",
|
||||||
|
SuggestionBuilder.Any,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
Some("1")
|
||||||
|
)
|
||||||
),
|
),
|
||||||
returnType = "Unnamed.Test.MyType",
|
selfType = "Standard.Base.Data.Numbers.Number",
|
||||||
selfType = "Unnamed.Test.MyMaybe",
|
returnType = "Unnamed.Test.Foo",
|
||||||
documentation = Some(" My conversion method")
|
documentation = None
|
||||||
|
),
|
||||||
|
Vector()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
"build conversion method with extra typed arguments" in {
|
||||||
|
val code =
|
||||||
|
"""import Standard.Base.Data.Numbers
|
||||||
|
|from Standard.Base.Data.Boolean import Boolean
|
||||||
|
|
|
||||||
|
|type Foo
|
||||||
|
| Value foo bar
|
||||||
|
|
|
||||||
|
|Foo.from (that:Numbers.Number) (other:Boolean=Boolean.True) = Foo.Value that other
|
||||||
|
|""".stripMargin
|
||||||
|
val module = code.preprocessModule
|
||||||
|
|
||||||
|
build(code, module) shouldEqual Tree.Root(
|
||||||
|
Vector(
|
||||||
|
ModuleNode,
|
||||||
|
Tree.Node(
|
||||||
|
Suggestion.Type(
|
||||||
|
externalId = None,
|
||||||
|
module = "Unnamed.Test",
|
||||||
|
name = "Foo",
|
||||||
|
params = Seq(),
|
||||||
|
returnType = "Unnamed.Test.Foo",
|
||||||
|
parentType = Some(SuggestionBuilder.Any),
|
||||||
|
documentation = None
|
||||||
|
),
|
||||||
|
Vector()
|
||||||
|
),
|
||||||
|
Tree.Node(
|
||||||
|
Suggestion.Constructor(
|
||||||
|
externalId = None,
|
||||||
|
module = "Unnamed.Test",
|
||||||
|
name = "Value",
|
||||||
|
arguments = Seq(
|
||||||
|
Suggestion
|
||||||
|
.Argument("foo", SuggestionBuilder.Any, false, false, None),
|
||||||
|
Suggestion
|
||||||
|
.Argument("bar", SuggestionBuilder.Any, false, false, None)
|
||||||
|
),
|
||||||
|
returnType = "Unnamed.Test.Foo",
|
||||||
|
documentation = None,
|
||||||
|
annotations = Seq()
|
||||||
|
),
|
||||||
|
Vector()
|
||||||
|
),
|
||||||
|
Tree.Node(
|
||||||
|
Suggestion.Getter(
|
||||||
|
externalId = None,
|
||||||
|
module = "Unnamed.Test",
|
||||||
|
name = "foo",
|
||||||
|
arguments = List(
|
||||||
|
Suggestion
|
||||||
|
.Argument("self", "Unnamed.Test.Foo", false, false, None)
|
||||||
|
),
|
||||||
|
selfType = "Unnamed.Test.Foo",
|
||||||
|
returnType = SuggestionBuilder.Any,
|
||||||
|
documentation = None,
|
||||||
|
annotations = Seq()
|
||||||
|
),
|
||||||
|
Vector()
|
||||||
|
),
|
||||||
|
Tree.Node(
|
||||||
|
Suggestion.Getter(
|
||||||
|
externalId = None,
|
||||||
|
module = "Unnamed.Test",
|
||||||
|
name = "bar",
|
||||||
|
arguments = List(
|
||||||
|
Suggestion
|
||||||
|
.Argument("self", "Unnamed.Test.Foo", false, false, None)
|
||||||
|
),
|
||||||
|
selfType = "Unnamed.Test.Foo",
|
||||||
|
returnType = SuggestionBuilder.Any,
|
||||||
|
documentation = None,
|
||||||
|
annotations = Seq()
|
||||||
|
),
|
||||||
|
Vector()
|
||||||
|
),
|
||||||
|
Tree.Node(
|
||||||
|
Suggestion.Conversion(
|
||||||
|
externalId = None,
|
||||||
|
module = "Unnamed.Test",
|
||||||
|
arguments = Seq(
|
||||||
|
Suggestion.Argument(
|
||||||
|
"that",
|
||||||
|
"Standard.Base.Data.Numbers.Number",
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
None
|
||||||
|
),
|
||||||
|
Suggestion
|
||||||
|
.Argument(
|
||||||
|
"other",
|
||||||
|
"Standard.Base.Data.Boolean.Boolean",
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
Some("Boolean.True"),
|
||||||
|
Some(
|
||||||
|
List(
|
||||||
|
"Standard.Base.Data.Boolean.Boolean.True",
|
||||||
|
"Standard.Base.Data.Boolean.Boolean.False"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
selfType = "Standard.Base.Data.Numbers.Number",
|
||||||
|
returnType = "Unnamed.Test.Foo",
|
||||||
|
documentation = None
|
||||||
),
|
),
|
||||||
Vector()
|
Vector()
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user