You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works must of the time, but weirdly fails in the code below:
classFoo {
valx1:String|Null=null
x1.nn.length
valx2:String= x1.nn
x1.nn.length
}
-- [E008] MemberNotFoundError: kk.scala:10:8--------------------------------10| x1.nn.length
|^^^^^^^^^^^^| value length is not a member of T||where: T is a typevariablewith constraint >:String
one error found
Line 10 is the second x1.nn.length. However, both
classFoo {
valx1:String|Null=null
x1.nn.length
// val x2: String = x1.nn <---------- commented out
x1.nn.length
}
and
classFoo {
valx1:String|Null=null
x1.nn.length
valx2= x1.nn // <---------- the type of `x2` is inferred
x1.nn.length
}
typecheck fine.
@liufengyun any hints about what could be going here?
The text was updated successfully, but these errors were encountered:
This solves a situation where we cannot find a member `m` of a qualifier of type `T`
where `T` is a type variable with lower bound `L`, where `m` is a member of `L`.
This has come up occasionally before, but never until now in minimized form. The
solution is to instantiate the type variable using `fullyDefinedType` and try again.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 14, 2019
The check relied on the assumption that `locked` is always contained in
`state.ownedVars`, but this can stop being true when an owned type
variable is garbage-collected.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 15, 2019
The check relied on the assumption that `locked` is always contained in
`state.ownedVars`, but this can stop being true when an owned type
variable is garbage-collected.
For the explicit nulls project, we want to have an extension method that strips away nullability:
This works must of the time, but weirdly fails in the code below:
Line 10 is the second
x1.nn.length
. However, bothand
typecheck fine.
@liufengyun any hints about what could be going here?
The text was updated successfully, but these errors were encountered: