New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StringTokens not seen as subtype of {Object*} #1106
Comments
The previous fix (677b021) wasn't enough - it still broke when the option was 'all'. To truly fix this, we need to be able to disable the text preference when it's created, before its listeners are attached. (Some other tabs can apparently enable and disable preferences during initialization without update problems - my best guess is that it's only problematic for string properties, but I didn't investigate it too much.) Also, the handling of this "union" option was pretty broken. Now we simply display 'all' in the text field when 'all' is checked (which makes sense because that's what we'll write to the config file). When that checkbox is unchecked, we insert the default inline annotations into the textfield. Also fixes the validity test. It's allowed to declare any annotations as inline, so we shouldn't have a list of "allowed" annotations; instead, we now only check if it's a valid annotation name. Includes a workaround for ceylon/ceylon-spec#1106.
Surely this bug belongs in |
-----BEGIN PGP SIGNED MESSAGE----- No idea… StringTokens does have reified type arguments String and On 03.10.2014 01:14, Gavin King wrote:
iQEcBAEBAgAGBQJULdywAAoJEOkUbI/rtXZKxNkH/jvroAhHxjhq2Y26rfQBt9zg |
That probably fixed it. |
Works great, thanks! |
The previous fix (677b021) wasn't enough - it still broke when the option was 'all'. To truly fix this, we need to be able to disable the text preference when it's created, before its listeners are attached. (Some other tabs can apparently enable and disable preferences during initialization without update problems - my best guess is that it's only problematic for string properties, but I didn't investigate it too much.) Also, the handling of this "union" option was pretty broken. Now we simply display 'all' in the text field when 'all' is checked (which makes sense because that's what we'll write to the config file). When that checkbox is unchecked, we insert the default inline annotations into the textfield. Also fixes the validity test. It's allowed to declare any annotations as inline, so we shouldn't have a list of "allowed" annotations; instead, we now only check if it's a valid annotation name. Includes a workaround for ceylon/ceylon-spec#1106.
Expected:
true
Actual:
false
Found in eclipse-archived/ceylon-ide-eclipse#987, where we use
String.split()
(not yet committed), which is then not recognized here.I stepped into the subtyping algorithm a bit, and apparently
StringTokens
’Absent
type parameter is somehow widened (during the check! it’s okay in the original descriptor) fromNull
toObject
, which is of course not a subtype of{Object*}
’sNull
.The text was updated successfully, but these errors were encountered: